[Bug c++/14075] ("foo") accepted as char[] initializer
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Tue Dec 21 19:28:00 GMT 2004
------- Additional Comments From gdr at integrable-solutions dot net 2004-12-21 19:27 -------
Subject: Re: ("foo") accepted as char[] initializer
"nathan at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
|
| PR c++/14075
| * decl.c (check_initializer): Check string initializer of array is
| not parenthesized.
| * cp-tree.h (PAREN_STRING_LITERAL_P): New.
| * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
| * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
The change for error.c is wrong. It should have been in
gccp/c-pretty-print.c. And the flag should have been common to both C
and C++ too.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14075
More information about the Gcc-bugs
mailing list