[cfe-commits] r83957 - in /cfe/trunk: lib/AST/Expr.cpp lib/CodeGen/CGExprConstant.cpp test/CodeGen/statements.c
Chris Lattner
clattner at apple.com
Tue Oct 13 14:56:32 PDT 2009
On Oct 13, 2009, at 2:29 PM, Douglas Gregor wrote:
>
> On Oct 13, 2009, at 12:14 AM, Chris Lattner wrote:
>
>> Author: lattner
>> Date: Tue Oct 13 02:14:16 2009
>> New Revision: 83957
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=83957&view=rev
>> Log:
>> Teach sema and codegen about the difference between address of
>> labels,
>> which is a common idiom to improve PIC'ness of code using the addr of
>> label extension. This implementation is a gross hack, but the only
>> other
>> alternative would be to teach evalutate about this horrid
>> combination.
>> While GCC allows things like "&&foo - &&bar + 1", people don't use
>> this
>> in practice. This implements PR5131.
>
>
> With this change, the CodeGen/statements.c test is breaking on 32-bit
> x86:
>
> http://smooshlab.apple.com:8010/builders/clang-i386-darwin9/builds/6428
>
> the failure is:
>
> test/CodeGen/statements.c:23:17: error: initializer element is not a
> compile-time constant
> static long x = &&bar - &&baz;
> ^~~~~~~~~~~~~
yay for implicit casts (or something), I'll fix.
-Chris
More information about the cfe-commits
mailing list