https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63484
Leif Leonhardy <bugfeed at online dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugfeed at online dot de --- Comment #1 from Leif Leonhardy <bugfeed at online dot de> --- As of GCC 6.1.0, the documentation has slightly changed: -fdelete-null-pointer-checks Assume that programs cannot safely dereference null pointers, and that no code or data element resides at address zero. This option enables simple constant folding optimizations at all optimization levels. In addition, other optimization passes in GCC use this flag to control global dataflow analyses that eliminate useless checks for null pointers; these assume that a memory access to address zero always results in a trap, so that if a pointer is checked after it has already been dereferenced, it cannot be null. Note however that in some environments this assumption is not true. Use -fno-delete-null-pointer-checks to disable this optimization for programs that depend on that behavior. This option is enabled by default on most targets. On Nios II ELF, it defaults to off. On AVR and CR16, this option is completely disabled. Passes that use the dataflow information are enabled independently at different optimization levels.