[Bug c/96554] -Wall does not include -Wnull-dereference

R.E.Wolff at BitWizard dot nl gcc-bugzilla@gcc.gnu.org
Mon Aug 10 13:02:28 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96554

--- Comment #2 from Roger Wolff <R.E.Wolff at BitWizard dot nl> ---
In my case it promotes a function I didn't declare as <does not return> into
one that <does not return> and thereby it caused 80% of my code to become
"dead". It'd be nice to differentiate between the case where a simple
optimization removes a few lines of code due to an extra null-check not being
reachable due to the trap  on the null dereference and the case where big
unexpected things start happening. 

Maybe the promotion of a function from "does return" to "does not return" is
something you might warn about. This satisfies the "you can easily modify the
code to silence the warning".


More information about the Gcc-bugs mailing list