This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/80730] bogus initializer element is not computable at load time converting a string to bool
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 May 2017 23:41:06 +0000
- Subject: [Bug c/80730] bogus initializer element is not computable at load time converting a string to bool
- Auto-submitted: auto-generated
- References: <bug-80730-4@http.gcc.gnu.org/bugzilla/>
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.