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".