News for hackers. Stuff that matters.
Re:When you see a Heisenbug in C, change your compiler's opt... by theseoafs on Sunday March 02, 2014 @03:09AM (#7328232)
Why would you expect the NULL pointer check to do anything? The function, as given, is meaningless if `p` is NULL. The problem isn't that compilers are too aggressive in their optimization -- the problem is that people who are learning C don't usually learn what it means for the behavior of a program to be undefined.

There are no comments on this comment yet.