Skip to content

Commit 994c1a6

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 aabaa47 commit 994c1a6

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)