Anders Carlsson wrote:-

>>> Ah, I see - I got ICEs and regular constant expressions mixed up.
>>
>> The 'a' is not permitted in a "regular constant expression" either.
>
> Hmm, why not?

No, wrong question, it should be "what right does it have to be?" :)

6.6p7 states the semantics of constant expressions in initializers,
of which this is one.  It is none of the four because of the "a".

This is only semantics, not a constraint, so an implementation
can accept other stuff as extensions, but I don't believe you were
writing extensions.

By the flip side of the coin, your expression doesn't violate a
constraint, but nor does it follow the semantics of the language,
so a conforming implementation has no requirement to accept your
expression.  Many don't.

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

Reply via email to