]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/22458 (ICE on missing brace)
authorRichard Sandiford <richard@codesourcery.com>
Mon, 8 Aug 2005 07:42:37 +0000 (07:42 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 8 Aug 2005 07:42:37 +0000 (07:42 +0000)
PR c/22458
* c-decl.c (c_begin_compound_stmt): Set the initial body to
error_mark_node, not NULL.

From-SVN: r102849

gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr22458-1.c

index 3ffe4e37ff60925afb50af45624964d34aadeb9e..b827fc16ce5b7bfb68edc5648cf0c2d82f46675d 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-08  Richard Sandiford  <richard@codesourcery.com>
+
+       PR c/22458
+       * c-decl.c (c_begin_compound_stmt): Set the initial body to
+       error_mark_node, not NULL.
+
 2005-08-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa64-regs.h (CONDITIONAL_REGISTER_USAGE): Fix loop upper bound.
index 4eca4f26dc7e9c74d50f73b4446d61be1c653430..38166cc94f39b54449228d1805387c2f69b06755 100644 (file)
@@ -6410,7 +6410,7 @@ c_begin_compound_stmt (void)
   tree stmt;
 
   /* Create the COMPOUND_STMT.  */
-  stmt = add_stmt (build_stmt (COMPOUND_STMT, NULL_TREE));
+  stmt = add_stmt (build_stmt (COMPOUND_STMT, error_mark_node));
 
   return stmt;
 }
index c86d9e54fa333f3db86e3ac6ce7daa89cbc80372..fb6e405443733692b4df4b82e21a6b88ad543cec 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-08  Richard Sandiford  <richard@codesourcery.com>
+
+       PR c/22458
+       * gcc.dg/pr22458-1.c: New test.
+
 2005-08-03  Richard Sandiford  <richard@codesourcery.com>
 
        PR target/18582
index 8b8032c410a6e1eb451833d295cc44736627a383..138bdd825798df358a2d10a0e42f78f93e605c2e 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-error "expected declaration or statement" "" { target *-*-* } 0 } */
+/* { dg-error "(parse|syntax) error" "" { target *-*-* } 0 } */
 void foo()
 {
      __PRETTY_FUNCTION__;