[cfe-commits] r67164 - in /cfe/trunk: lib/CodeGen/CGExpr.cpp test/CodeGen/exprs.c

Chris Lattner clattner at apple.com
Wed Mar 18 10:17:17 PDT 2009


On Mar 17, 2009, at 9:40 PM, Eli Friedman wrote:

> 2009/3/17 Chris Lattner <sabre at nondot.org>:
>> +    // Casts are only lvalues when the source and destination  
>> types are the
>> +    // same.
>
> Not true... take the following testcase (which asserts):
> union x {int x; float y;};
> int a() {return ((union x)2).x;}

Yep, you're absolutely right.  I got confused by the "lvalueness" of  
the phrasing in the code generator.  Will fix/implement.

-Chris



More information about the cfe-commits mailing list