https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83060

--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
I'd say for C it's valid to reject &a.s[-1] and &a.s[__PTRDIFF_MAX__] in 
static initializers, because there is no guarantee that such addresses are 
valid values of the pointer type (only pointers to actual array elements 
or just-past-end-of-array are necessarily valid).  I don't think it's 
required to reject such initializers, however.  Of course when not in a 
static initializer, such expressions must be accepted, while causing 
undefined behavior at runtime if executed.

Reply via email to