aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-11-20 00:29:04 -0800
committerPaul Eggert2012-11-20 00:29:04 -0800
commitd7fcbbfe4a6f310814b45ee1a0aa7ccb458f0eb1 (patch)
treeecdb12cd03c76bced307fc43bd6ff4e0b49c0d3c
parent952580c5fd273ff9d8f095ab8edb6b116d07eb56 (diff)
downloademacs-d7fcbbfe4a6f310814b45ee1a0aa7ccb458f0eb1.tar.gz
emacs-d7fcbbfe4a6f310814b45ee1a0aa7ccb458f0eb1.zip
Omit -Wstrict-overflow as it does not play well with --enable-checking.
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac7
2 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6852069087a..cd31e954721 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,8 @@
12012-11-19 Paul Eggert <eggert@cs.ucla.edu> 12012-11-20 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Improve static checking of integer overflow and stack smashing. 3 Improve static checking of integer overflow and stack smashing.
4 * configure.ac (WARN_CFLAGS): Add -Wstack-protector and 4 * configure.ac (WARN_CFLAGS): Add -Wstack-protector
5 -Wstrict-overflow if using GCC 4.7.2 or later on a platform with 5 if using GCC 4.7.2 or later on a platform with
6 at least 64-bit long int. This improves static checking on these 6 at least 64-bit long int. This improves static checking on these
7 platforms, when configured with --enable-gcc-warnings. 7 platforms, when configured with --enable-gcc-warnings.
8 8
diff --git a/configure.ac b/configure.ac
index 2a079cad264..01fe72d1ee6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -710,6 +710,8 @@ else
710 nw="$nw -Wfloat-equal" # warns about high-quality code 710 nw="$nw -Wfloat-equal" # warns about high-quality code
711 nw="$nw -Winline" # OK to ignore 'inline' 711 nw="$nw -Winline" # OK to ignore 'inline'
712 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. 712 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
713 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
714 # signed overflow has undefined behavior
713 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning 715 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
714 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations 716 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
715 717
@@ -720,7 +722,7 @@ else
720 # The following line should be removable at some point. 722 # The following line should be removable at some point.
721 nw="$nw -Wsuggest-attribute=pure" 723 nw="$nw -Wsuggest-attribute=pure"
722 724
723 AC_MSG_CHECKING([whether to use -Wstack-protector -Wstrict-overflow]) 725 AC_MSG_CHECKING([whether to use -Wstack-protector])
724 AC_PREPROC_IFELSE( 726 AC_PREPROC_IFELSE(
725 [AC_LANG_PROGRAM( 727 [AC_LANG_PROGRAM(
726 [[#if (1 <= __LONG_MAX__ >> 31 >> 31 \ 728 [[#if (1 <= __LONG_MAX__ >> 31 >> 31 \
@@ -732,8 +734,7 @@ else
732 ]])], 734 ]])],
733 [AC_MSG_RESULT(yes)], 735 [AC_MSG_RESULT(yes)],
734 [AC_MSG_RESULT(no) 736 [AC_MSG_RESULT(no)
735 nw="$nw -Wstack-protector" 737 nw="$nw -Wstack-protector"])
736 nw="$nw -Wstrict-overflow"])
737 738
738 gl_MANYWARN_ALL_GCC([ws]) 739 gl_MANYWARN_ALL_GCC([ws])
739 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) 740 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])