Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d7fcbbfe
Commit
d7fcbbfe
authored
Nov 20, 2012
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit -Wstrict-overflow as it does not play well with --enable-checking.
parent
952580c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
ChangeLog
ChangeLog
+3
-3
configure.ac
configure.ac
+4
-3
No files found.
ChangeLog
View file @
d7fcbbfe
2012-11-
19
Paul Eggert <eggert@cs.ucla.edu>
2012-11-
20
Paul Eggert <eggert@cs.ucla.edu>
Improve static checking of integer overflow and stack smashing.
* configure.ac (WARN_CFLAGS): Add -Wstack-protector
and
-Wstrict-overflow
if using GCC 4.7.2 or later on a platform with
* configure.ac (WARN_CFLAGS): Add -Wstack-protector
if using GCC 4.7.2 or later on a platform with
at least 64-bit long int. This improves static checking on these
platforms, when configured with --enable-gcc-warnings.
...
...
configure.ac
View file @
d7fcbbfe
...
...
@@ -710,6 +710,8 @@ else
nw="$nw -Wfloat-equal" # warns about high-quality code
nw="$nw -Winline" # OK to ignore 'inline'
nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
nw="$nw -Wstrict-overflow" # OK to optimize assuming that
# signed overflow has undefined behavior
nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
...
...
@@ -720,7 +722,7 @@ else
# The following line should be removable at some point.
nw="$nw -Wsuggest-attribute=pure"
AC_MSG_CHECKING([whether to use -Wstack-protector
-Wstrict-overflow
])
AC_MSG_CHECKING([whether to use -Wstack-protector])
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM(
[[#if (1 <= __LONG_MAX__ >> 31 >> 31 \
...
...
@@ -732,8 +734,7 @@ else
]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
nw="$nw -Wstack-protector"
nw="$nw -Wstrict-overflow"])
nw="$nw -Wstack-protector"])
gl_MANYWARN_ALL_GCC([ws])
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment