News for hackers. Stuff that matters.
Re:Null Pointer Dereferencing Causes Undefined Behavior by monochromatic on Tuesday April 21, 2015 @07:23AM (#9413295)
> Saying that it has "undefined behavior" means that the C language standard says nothing about how it behaves. If its behavior for the current compiler happens to satisfy the language requirements for offsetof, then it's a legitimate implementation. Code that implements the standard library is free to do whatever it likes, as long as the resulting behavior is correct.

Undefined is not the same as implementation-defined. Yes, a given implementation is free to do whatever it wants, but code that includes a null pointer dereference is not C code.

There are no comments on this comment yet.