mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
In DEBUG mode, make toxcore crash on signed integer overflow.
Signed overflow is undefined behaviour, so in debug mode, we want to make it fail in a noisy way.
This commit is contained in:
parent
8a4a5c2aa2
commit
cf9caa069a
|
@ -115,6 +115,8 @@ if(NOT MSVC)
|
||||||
# Allows wine to display source code file names and line numbers on crash in its backtrace
|
# Allows wine to display source code file names and line numbers on crash in its backtrace
|
||||||
add_flag("-gdwarf-2")
|
add_flag("-gdwarf-2")
|
||||||
endif()
|
endif()
|
||||||
|
# Crash on signed integer overflow.
|
||||||
|
add_flag("-ftrapv")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(WARNINGS "Enable additional compiler warnings" ON)
|
option(WARNINGS "Enable additional compiler warnings" ON)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user