Re:Undefined behavior can result in time travel
by mikeash on Friday June 27, 2014 @10:30PM
(#7957240)
The standard library thing is interesting. Modern compilers actually understand that stuff a lot. I don't think they'll reach into the implementation, but they understand the guaranteed semantics. For example, they know that this is undefined behavior:
And the nasal demons shall flow freely. The compiler will certainly know that there's a NULL check in there. However, the smarts are different enough that it will also know not to warn you about it. So, yes, this is an example that won't happen in reality, although there's no reason it couldn't.
[ Parent
| on HN ]
There are no comments on this comment yet.