3 ms·
https://linux.die.net/man/1/gcc https://linux.die.net/man/1/gcc -- Search for `-fstrict-overflow`. And note how it says The -fstrict-overflow option is enabl
by majewsky 9y ago
https://linux.die.net/man/1/gcc https://linux.die.net/man/1/gcc -- Search for `-fstrict-overflow`. And note how it says
The -fstrict-overflow option is enabled at levels -O2, -O3, -Os.
In other words, basically every program that you're using is compiled with that option enabled. (Release builds typically use -O2, sometimes even -O3.)
- osandov 9y ago-fstrict-overflow is the opposite of what the parent comment was asking about. You want -fwrapv or -fno-strict-overflow.
- majewsky 9y agoI was answering the "not aware that any compilers were doing this" part, hoping that they would be able to answer their second question using the source I linked.