On Feb 2, 2012, at 2:41 PM, Abramo Bagnara wrote:
> Il 02/02/2012 23:27, Richard Smith ha scritto:
>> 
>> 
>> Yes, absolutely. As in my original example:
>> 
>>   enum E { n = 2 };
>>   E e = (E)5;
>> 
>> Here, I think that (E)5 is not a constant expression, but (E)3 is.
>> Possibly we're in violent agreement about that?
> 
> My reading of the standard confirms that: the value of (E)5 is defined
> "unspecified" and there is no warranty that (int)(E)5 is equal to 5.

If the value is merely unspecified, then it's still a constant expression
under the DR1313 wording.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to