This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is the GCC optimazer too smart?


Thomas Martitz wrote:
> Am 10.12.2009 13:10, schrieb Andrew Haley:
> 
>>> Now my question is: is it correct that the compiler enforces the
>>> constantness of the variable, even tought it states in the warning
>>> that the const qualifier has been discarded?
>>>      
>> Yes.
>>    
> and
>>   behavior is undefined. ...
>>
>>    
> 
> doesn't really match though. The standard doesn't give the answer.

Sure it does.  The behaviour is undefined, so the compiler can do
anything it likes.  Demons may fly out of your nose.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]