diff options
| author | Paul Eggert | 2012-04-09 00:45:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-04-09 00:45:59 -0700 |
| commit | b8df54ffbefc5ddf40ddcda68a2a682769c5833d (patch) | |
| tree | 95b4e71a64030550e3c1719575121e773167d53a /src/process.c | |
| parent | cb3c2e3eca8bf31ac861739272ba1e182f4ec295 (diff) | |
| download | emacs-b8df54ffbefc5ddf40ddcda68a2a682769c5833d.tar.gz emacs-b8df54ffbefc5ddf40ddcda68a2a682769c5833d.zip | |
configure: new option --enable-gcc-warnings
I have been using this change for many months in my private copy
of Emacs, and have used it to find several bugs. It's mature
enough to publish now.
* Makefile.in (GNULIB_MODULES): Add warnings, manywarnings.
* configure.in: Support --enable-gcc-warnings, in the style of
other GNU packages such as coreutils.
(C_WARNINGS_SWITCH): Remove, replacing with...
(WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable.
(PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I,
when including system files with GCC.
* etc/NEWS: Mention --enable-gcc-warnings.
* lib/Makefile.am (AM_CFLAGS): New macro.
* m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
* lib-src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(BASE_CFLAGS): Use new macros rather than old.
* lwlib/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* oldXMenu/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/Makefile.in (C_WARNINGS_SWITCH): Remove.
(WARN_CFLAGS, WERROR_CFLAGS): New macros.
(ALL_CFLAGS): Use new macros rather than old.
* src/process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
* src/regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
-Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
-Wunused-result, -Wunused-variable. This should go away once
the Emacs and Gnulib regex code is merged.
(xmalloc, xrealloc): Now static.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index f2f33a9eafc..f14de474ee0 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -120,6 +120,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 120 | #include "nsterm.h" | 120 | #include "nsterm.h" |
| 121 | #endif | 121 | #endif |
| 122 | 122 | ||
| 123 | /* Work around GCC 4.7.0 bug with strict overflow checking; see | ||
| 124 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>. | ||
| 125 | These lines can be removed once the GCC bug is fixed. */ | ||
| 126 | #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ | ||
| 127 | # pragma GCC diagnostic ignored "-Wstrict-overflow" | ||
| 128 | #endif | ||
| 129 | |||
| 123 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; | 130 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; |
| 124 | Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; | 131 | Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; |
| 125 | Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; | 132 | Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; |