Skip to content

Commit 227e1ff

Browse files
committedJul 6, 2017
Makefile: Warn on overflow undefined behavior
To ensure our sanity checks stay sane, it's good to make sure we aren't invoking undefined overflow behavior. Make the compiler warn us when it attempts to take advantage of undefined overflow in optimizing.
1 parent 8bc8b6e commit 227e1ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ endif
137137

138138
SYSLIBS:=-lgcc -lc -lnosys
139139
DEBUG:=-g3
140-
WARNING:=-Wall -Werror
140+
WARNING:=-Wall -Wstrict-overflow=3 -Werror
141141

142142
# Select optimizations depending on the build mode.
143143
ifeq ("$(BUILD_MODE)","debug")

0 commit comments

Comments
 (0)
Please sign in to comment.