]> code.delx.au - gnu-emacs/commitdiff
Port --enable-gcc-warnings to Cygwin, FreeBSD
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 30 May 2016 23:09:25 +0000 (16:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 30 May 2016 23:13:04 +0000 (16:13 -0700)
These platforms have a bug where _Noreturn is empty when 'lint' is
defined.  Problem reported by Ken Brown (Bug#23640).
* configure.ac (GCC_LINT): Rename from 'lint'.
* src/conf_post.h (IF_LINT): Use GCC_LINT, not just 'lint’.

configure.ac
src/conf_post.h

index e88a3a943aca34f33be92f33f7bd96bdb5f58a55..37a159f41172e61fe65bee9371d96546576be7ba 100644 (file)
@@ -997,7 +997,7 @@ AS_IF([test $gl_gcc_warnings = no],
     gl_WARN_ADD([-Wno-pointer-sign])
   fi
 
-  AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
+  AC_DEFINE([GCC_LINT], [1], [Define to 1 if --enable-gcc-warnings.])
   AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
   AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE],
   [/* Enable compile-time and run-time bounds-checking, and some warnings,
index 5d3394fafce36547afcb7e8287e9f98025ff67e0..f16f8ee791a88a5ed7b8a8fcac4f14f3ce02b7ca 100644 (file)
@@ -343,9 +343,8 @@ extern int emacs_setenv_TZ (char const *);
 # define FLEXIBLE_ARRAY_MEMBER
 #endif
 
-/* Use this to suppress gcc's `...may be used before initialized' warnings. */
-#ifdef lint
 /* Use CODE only if lint checking is in effect.  */
+#if defined GCC_LINT || defined lint
 # define IF_LINT(Code) Code
 #else
 # define IF_LINT(Code) /* empty */