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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Airbak from comment #3) 
> 2.
> *((unsigned int *)0) is OK
> *((volatile unsigned int *)0)  is not OK.
> Why the "volatile"  makes different?

Because volatile prevents the compiler from optimizing that statement out.  As
stated above, dereferencing a NULL pointer is undefined, so if you do that, all
bets are off.

You can use -fno-isolate-erroneous-paths-dereference, but I think the problem
is elsewhere.

Reply via email to