News for hackers. Stuff that matters.
Re:Xcode 4 ships a buggy compiler by bdonlan on Saturday December 31, 2011 @09:49AM (#3410951)
The 'consistency' I speak of is the idea that, if I assign alloca(0) to a variable, it's either NULL or non-NULL - I can't look at that same variable two different ways and get different answers. From the sounds of the article, this requirement might be violated by this bug.
Re:Xcode 4 ships a buggy compiler by mikeash on Saturday December 31, 2011 @10:12AM (#3410991)
I don't think so. Only one comparison is being done in the example code. I'd bet that if you e.g. printed out the value of the pointer before the if statement, the optimization would no longer kick in as it does.