[LLVMdev] LLVM 2.4 problem? (resend)

David Vandevoorde daveed at vandevoorde.com
Wed Oct 15 09:00:35 PDT 2008


On Oct 15, 2008, at 9:43 AM, Duncan Sands wrote:

>> True, but note that it is the address of a variable that is used, not
>> the value.
>
> Yes, but why do you think they should get a different address?  I can
> understand that it is surprising that they do, but determining whether
> this is legal or not requires reading the language standard.   
> Hopefully
> a language lawyer can chime in and say whether this transform is valid
> or not.


FWIW, I've been discussing this with some of my colleagues (who may  
well be the foremost experts on this topic), and so far we don't have  
a definite answer (we're looking at C99 and C++).  We do think that a  
strict reading of the standard allows the optimization, but there is  
also some suspicion that that is unintended (at least in C++).

	Daveed




More information about the llvm-dev mailing list