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 /lwlib | |
| 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 'lwlib')
| -rw-r--r-- | lwlib/ChangeLog | 7 | ||||
| -rw-r--r-- | lwlib/Makefile.in | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index a4bb243f35d..f4800bc4bb0 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-04-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | configure: new option --enable-gcc-warnings | ||
| 4 | * Makefile.in (C_WARNINGS_SWITCH): Remove. | ||
| 5 | (WARN_CFLAGS, WERROR_CFLAGS): New macros. | ||
| 6 | (ALL_CFLAGS): Use new macros rather than old. | ||
| 7 | |||
| 1 | 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru> | 8 | 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 9 | ||
| 3 | * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with | 10 | * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with |
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index db108862d70..76507ac4b24 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in | |||
| @@ -29,8 +29,9 @@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ | |||
| 29 | C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ | 29 | C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ |
| 30 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ | 30 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ |
| 31 | C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | 31 | C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ |
| 32 | C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ | ||
| 33 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ | 32 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ |
| 33 | WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'` | ||
| 34 | WERROR_CFLAGS = @WERROR_CFLAGS@ | ||
| 34 | 35 | ||
| 35 | CC=@CC@ | 36 | CC=@CC@ |
| 36 | CFLAGS=@CFLAGS@ | 37 | CFLAGS=@CFLAGS@ |
| @@ -54,7 +55,8 @@ OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o | |||
| 54 | ## There are no generated lwlib files, hence no need for -I. | 55 | ## There are no generated lwlib files, hence no need for -I. |
| 55 | ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ | 56 | ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ |
| 56 | $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ | 57 | $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ |
| 57 | $(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \ | 58 | $(WARN_CFLAGS) $(WERROR_CFLAGS) \ |
| 59 | $(PROFILING_CFLAGS) $(CFLAGS) \ | ||
| 58 | -DHAVE_CONFIG_H -Demacs -I../src \ | 60 | -DHAVE_CONFIG_H -Demacs -I../src \ |
| 59 | -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib | 61 | -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib |
| 60 | 62 | ||