]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix --enable-gcc-warnings problem with older GCC
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 10 Oct 2015 18:56:20 +0000 (11:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 10 Oct 2015 18:57:36 +0000 (11:57 -0700)
* 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
src/puresize.h

index 785e5d7554b240593c5f21086f2f1e7f3b34504a..2c3eee59b772be5d754dc6891487e89f12f1eb04 100644 (file)
@@ -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
index d0926c65213588df87df9c79b367afac31784cb7..c61b31f2bde03245ffc6e3e64831e1a3c3763e5c 100644 (file)
@@ -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