all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: schwab@suse.de, emacs-devel@gnu.org
Subject: Re: Master is broken
Date: Sat, 10 Oct 2015 12:01:29 -0700	[thread overview]
Message-ID: <56196089.6070809@cs.ucla.edu> (raw)
In-Reply-To: <83vbaer6k3.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

Eli Zaretskii wrote:
> Also, when exactly are INLINE_HEADER_BEGIN/END required?  puresize.h
> doesn't have it, and still compiles; other headers which use INLINE do
> have INLINE_HEADER_BEGIN/END.  What factor determines whether they are
> absolutely required?

They're always needed, if you want to build with --enable-gcc-warnings and use 
GCC older than 5.1.  I hope we can drop them once we assume that people who want 
picky warnings are using GCC 5.1 or later.  I forgot to add them to puresize.h 
since I use GCC 5.2; nobody else has needed them yet, I guess, since nobody with 
older compilers uses --enable-gcc-warnings.  I fixed this with the attached 
additional patch.

[-- Attachment #2: 0001-Fix-enable-gcc-warnings-problem-with-older-GCC.patch --]
[-- Type: text/plain, Size: 1778 bytes --]

From 1b0ab7d132f4b6956b2061a550e533833b0bdc68 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 10 Oct 2015 11:56:20 -0700
Subject: [PATCH] Fix --enable-gcc-warnings problem with older GCC

* src/puresize.h: Add INLINE_HEADER_BEGIN, INLINE_HEADER_END.
This is for building with --enable-gcc-warnings with
GCC 4.6 through 5.0.
---
 src/conf_post.h | 5 +++++
 src/puresize.h  | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/conf_post.h b/src/conf_post.h
index 785e5d7..2c3eee5 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -316,6 +316,11 @@ extern int emacs_setenv_TZ (char const *);
 
    before including config.h or any other .h file.
    Other .c files should not define INLINE.
+   For Emacs, this is done by having emacs.c first '#define INLINE
+   EXTERN_INLINE' and then include every .h file that uses INLINE.
+
+   The INLINE_HEADER_BEGIN and INLINE_HEADER_END suppress bogus
+   warnings in some GCC versions; see ../m4/extern-inline.m4.
 
    C99 compilers compile functions like 'incr' as C99-style extern
    inline functions.  Buggy GCC implementations do something similar with
diff --git a/src/puresize.h b/src/puresize.h
index d0926c6..c61b31f 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -16,6 +16,8 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
+INLINE_HEADER_BEGIN
+
 /* Define PURESIZE, the number of bytes of pure Lisp code to leave space for.
 
    At one point, this was defined in config.h, meaning that changing
@@ -88,3 +90,5 @@ CHECK_IMPURE (Lisp_Object obj, void *ptr)
   if (PURE_P (ptr))
     pure_write_error (obj);
 }
+
+INLINE_HEADER_END
-- 
2.1.4


  reply	other threads:[~2015-10-10 19:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-10  8:47 Master is broken Eli Zaretskii
2015-10-10 10:44 ` Andy Moreton
2015-10-10 10:54   ` Eli Zaretskii
2015-10-10 11:27     ` Andy Moreton
2015-10-10 10:46 ` Eli Zaretskii
2015-10-10 15:59   ` Andreas Schwab
2015-10-10 16:19     ` Eli Zaretskii
2015-10-10 16:46   ` Paul Eggert
2015-10-10 17:06     ` Eli Zaretskii
2015-10-10 17:12       ` Eli Zaretskii
2015-10-10 19:01         ` Paul Eggert [this message]
2015-10-10 19:05           ` Eli Zaretskii
2015-10-10 19:31             ` Paul Eggert
2015-10-11  0:13           ` Juanma Barranquero
2015-10-11  0:32             ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56196089.6070809@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.