Skip to content

Commit 5aba9d7

Browse files
committed
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 c3b82c7 commit 5aba9d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
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)