[Bug c++/36089] [4.1/4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed May 7 23:18:00 GMT 2008
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-05-07 23:18 -------
This patch works for me:
Index: cp/parser.c
======================================================
=============
--- cp/parser.c (revision 2473)
+++ cp/parser.c (working copy)
@@ -4659,6 +4659,10 @@ cp_parser_parenthesized_expression_list
if (identifier)
expression_list = tree_cons (NULL_TREE, identifier, expression_list);
+ /* If we have a constant, just return the value. */
+ if (non_constant_p && !*non_constant_p)
+ return TREE_VALUE (expression_list);
+
return expression_list;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36089
More information about the Gcc-bugs
mailing list