diff options
| author | Paul Eggert | 2016-05-30 16:09:25 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-30 16:13:04 -0700 |
| commit | cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87 (patch) | |
| tree | cf6cf625bb880b9ca5453bce43c474c1d73f4d62 | |
| parent | e7b01df5cf83cdb7e7ca5558a0f557cf6354dace (diff) | |
| download | emacs-cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87.tar.gz emacs-cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87.zip | |
Port --enable-gcc-warnings to Cygwin, FreeBSD
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’.
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | src/conf_post.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e88a3a943ac..37a159f4117 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -997,7 +997,7 @@ AS_IF([test $gl_gcc_warnings = no], | |||
| 997 | gl_WARN_ADD([-Wno-pointer-sign]) | 997 | gl_WARN_ADD([-Wno-pointer-sign]) |
| 998 | fi | 998 | fi |
| 999 | 999 | ||
| 1000 | AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) | 1000 | AC_DEFINE([GCC_LINT], [1], [Define to 1 if --enable-gcc-warnings.]) |
| 1001 | AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) | 1001 | AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) |
| 1002 | AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE], | 1002 | AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE], |
| 1003 | [/* Enable compile-time and run-time bounds-checking, and some warnings, | 1003 | [/* Enable compile-time and run-time bounds-checking, and some warnings, |
diff --git a/src/conf_post.h b/src/conf_post.h index 5d3394fafce..f16f8ee791a 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -343,9 +343,8 @@ extern int emacs_setenv_TZ (char const *); | |||
| 343 | # define FLEXIBLE_ARRAY_MEMBER | 343 | # define FLEXIBLE_ARRAY_MEMBER |
| 344 | #endif | 344 | #endif |
| 345 | 345 | ||
| 346 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 347 | #ifdef lint | ||
| 348 | /* Use CODE only if lint checking is in effect. */ | 346 | /* Use CODE only if lint checking is in effect. */ |
| 347 | #if defined GCC_LINT || defined lint | ||
| 349 | # define IF_LINT(Code) Code | 348 | # define IF_LINT(Code) Code |
| 350 | #else | 349 | #else |
| 351 | # define IF_LINT(Code) /* empty */ | 350 | # define IF_LINT(Code) /* empty */ |