From: Paul Eggert Date: Mon, 30 May 2016 23:09:25 +0000 (-0700) Subject: Port --enable-gcc-warnings to Cygwin, FreeBSD X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87 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’. --- diff --git a/configure.ac b/configure.ac index e88a3a943a..37a159f411 100644 --- a/configure.ac +++ b/configure.ac @@ -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, diff --git a/src/conf_post.h b/src/conf_post.h index 5d3394fafc..f16f8ee791 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -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 */