From 1b0ab7d132f4b6956b2061a550e533833b0bdc68 Mon Sep 17 00:00:00 2001 From: Paul Eggert 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 . */ +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