This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14075] ("foo") accepted as char[] initializer
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2004 18:28:58 -0000
- Subject: [Bug c++/14075] ("foo") accepted as char[] initializer
- References: <20040208190047.14075.porten@kde.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From nathan at gcc dot gnu dot org 2004-12-21 18:28 -------
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.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14075