emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c0ae125: Fix --enable-gcc-warnings problem with old


From: Paul Eggert
Subject: [Emacs-diffs] master c0ae125: Fix --enable-gcc-warnings problem with older GCC
Date: Sat, 10 Oct 2015 18:57:43 +0000

branch: master
commit c0ae12581c8f961ecad6d8ae1a1c4489c0e0abed
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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(+), 0 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]