http://llvm.org/bugs/show_bug.cgi?id=13500
Douglas Gregor <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Douglas Gregor <[email protected]> 2012-08-01 12:32:49 CDT --- What's happening is that int buf[ [obj count] ]; is being parsed as int buf with a C++11 attribute [[obj count]] (which gets ignored). Top-of-tree Clang disambiguates this to what the programmer actually expects, which is a VLA whose size is determined by [obj count]. The workaround, in the meantime, is to wrap a set of parentheses around the message send, e.g., int buf[ ([obj count]) ]; or more the VLA size computation out to a separate variable NSUInteger n = [obj count]; int buf[n]; -- Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
