From: Paul Eggert Date: Sat, 10 Oct 2015 18:56:20 +0000 (-0700) Subject: Fix --enable-gcc-warnings problem with older GCC X-Git-Tag: emacs-25.0.90~1174 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0ae12581c8f961ecad6d8ae1a1c4489c0e0abed;p=emacs.git 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. --- diff --git a/src/conf_post.h b/src/conf_post.h index 785e5d7554b..2c3eee59b77 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 d0926c65213..c61b31f2bde 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 . */ +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