mirror of
https://github.com/gbdev/rgbds.git
synced 2025-12-01 23:37:48 +00:00
Enable GCC options to detect undefined behaviour
GCC has an Undefined Behavior Sanitizer (ubsan), which enables run-time checks of undefined behaviour. It has been enabled for the `develop` build target. A small bug detected with it has been fixed. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
7
Makefile
7
Makefile
@@ -207,7 +207,12 @@ develop:
|
||||
-Wstringop-overflow=4 -Walloc-zero -Wduplicated-cond \
|
||||
-Wfloat-equal -Wshadow -Wcast-qual -Wcast-align -Wlogical-op \
|
||||
-Wnested-externs -Wno-aggressive-loop-optimizations -Winline \
|
||||
-Wundef -Wstrict-prototypes -Wold-style-definition"
|
||||
-Wundef -Wstrict-prototypes -Wold-style-definition \
|
||||
-fsanitize=shift -fsanitize=integer-divide-by-zero \
|
||||
-fsanitize=unreachable -fsanitize=vla-bound \
|
||||
-fsanitize=signed-integer-overflow -fsanitize=bounds \
|
||||
-fsanitize=object-size -fsanitize=bool -fsanitize=enum \
|
||||
-fsanitize=alignment -fsanitize=null"
|
||||
|
||||
# Targets for the project maintainer to easily create Windows exes.
|
||||
# This is not for Windows users!
|
||||
|
||||
Reference in New Issue
Block a user