aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-02-23 05:30:48 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2005-02-23 05:30:48 +0000
commit744b12b65f6923a713593f404f97384c6093dd94 (patch)
treeb003a007ec3edf4d8323134ca4e5d3a88c20f95d /gcc/cp/error.c
parent90c1d75a9bb8e25aa963da02f9c91f5f40143be1 (diff)
downloadgcc-744b12b65f6923a713593f404f97384c6093dd94.zip
gcc-744b12b65f6923a713593f404f97384c6093dd94.tar.gz
gcc-744b12b65f6923a713593f404f97384c6093dd94.tar.bz2
re PR c++/19991 (Enum not accepted in array-size)
PR c++/19991 * init.c (integral_constant_value): Iterate if the value of a decl is itself a constant. PR c++/20152 * parser.c (cp_parser_class_head): Check for redefintions here. * semantics.c (begin_class_definition): Not here. PR c++/20153 * decl2.c (build_anon_union_vars): Add type parameter. (finish_anon_union): Pass it. PR c++/20148 * error.c (dump_expr): Do not print the body of a BIND_EXPR. Handle STATEMENT_LIST. PR c++/19991 * g++.dg/parse/constant7.C: New test. PR c++/20152 * g++.dg/parse/error27.C: New test. * g++.dg/template/qualttp15.C: Adjust error markers. * g++.old-deja/g++.other/struct1.C: Likewise. PR c++/20153 * g++.dg/template/error17.C: New test. PR c++/20148 * g++.dg/parser/error26.C: New test. From-SVN: r95438
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 86ea7aa..888a4e8 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1815,18 +1815,14 @@ dump_expr (tree t, int flags)
dump_decl (t, flags);
break;
+ case BIND_EXPR:
case STMT_EXPR:
+ case STATEMENT_LIST:
/* We don't yet have a way of dumping statements in a
human-readable format. */
pp_string (cxx_pp, "({...})");
break;
- case BIND_EXPR:
- pp_cxx_left_brace (cxx_pp);
- dump_expr (TREE_OPERAND (t, 1), flags & ~TFF_EXPR_IN_PARENS);
- pp_cxx_right_brace (cxx_pp);
- break;
-
case LOOP_EXPR:
pp_string (cxx_pp, "while (1) { ");
dump_expr (TREE_OPERAND (t, 0), flags & ~TFF_EXPR_IN_PARENS);