This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14075] ("foo") accepted as char[] initializer


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]