1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 14:10:47 -08:00

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’.
This commit is contained in:
Paul Eggert 2016-05-30 16:09:25 -07:00
parent e7b01df5cf
commit cb379cbb7f
2 changed files with 2 additions and 3 deletions

View 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,

View 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 */