[Bug c/80730] bogus initializer element is not computable at load time converting a string to bool

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Sat May 13 00:19:00 GMT 2017


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

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
See <https://www.polyomino.org.uk/computer/c/const-exprs-c99.txt> for my 
old syntactic model of constant expressions in C99.  I'd consider it 
appropriate to handle implicit conversions in initializers exactly the 
same as casts are handled.

Essentially, I think that the intent for address constants is something 
syntactic (including implicit type conversions and conversions of arrays 
to pointers in the syntax) which is only approximated by the wording.  
Much like e.g. C90 and C99 both messed up the definition of lvalue in 
different ways and only C11 captured the essential concept of lvalues as 
everyone understood them.


More information about the Gcc-bugs mailing list