News for hackers. Stuff that matters.
Re:Xcode 4 ships a buggy compiler by ams6110 on Friday December 30, 2011 @11:07PM (#3410122)
At the bottom of my man page:

  BUGS
     The alloca() function is machine and compiler dependent; its use is dis-
     couraged.
Re:Xcode 4 ships a buggy compiler by FooBarWidget on Saturday December 31, 2011 @04:47AM (#3410573)
I interpret that statement as it being similar to __asm__(), which is also machine and compiler dependent and discouraged in portable code. Still, sometimes you need it when writing low-level code. __asm__ doesn't blow up the way alloca in the given example does.
Re:Xcode 4 ships a buggy compiler by psykotic on Saturday December 31, 2011 @05:54AM (#3410660)
Incidentally, I ran into a nasty x64 __asm__ codegen bug with exactly the same compiler version that this blog post covers. It was in lockless multithreaded code, so you can imagine how much fun that was to debug. Rather than work around it, I ended up replacing all our GCC inline assembly with modern intrinsics like __sync_fetch_and_add.
Re:Xcode 4 ships a buggy compiler by mikeash on Saturday December 31, 2011 @11:05AM (#3411118)
The example doesn't blow up at all, it just doesn't happen to behave in exactly the same way as a different compiler.