aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-parser.c2
-rw-r--r--gcc/testsuite/ChangeLog14
-rw-r--r--gcc/testsuite/gcc.dg/init-bad-5.c5
4 files changed, 22 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eb198c8..72e1d46 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,8 +1,14 @@
+2006-08-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/28136
+ * c-parser.c (c_parser_postfix_expression_after_paren_type): Robustify.
+
2006-08-04 Jan Hubicka <jh@suse.cz>
PR target/26655
PR target/28270
- * reload.c (push_reload): Patch out the mismathcing instruction; return early.
+ * reload.c (push_reload): Patch out the mismatching instruction;
+ return early.
(find_reload): Bail out if the instruction was patched out.
2006-08-04 Jan Hubicka <jh@suse.cz>
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 32d2c51..f895d42 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -5432,7 +5432,7 @@ c_parser_postfix_expression_after_paren_type (c_parser *parser,
struct c_expr expr;
start_init (NULL_TREE, NULL, 0);
type = groktypename (type_name);
- if (C_TYPE_VARIABLE_SIZE (type))
+ if (type != error_mark_node && C_TYPE_VARIABLE_SIZE (type))
{
error ("compound literal has variable size");
type = error_mark_node;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9f08182..99bbfc5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,10 +1,14 @@
+2006-08-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/28136
+ * gcc.dg/init-bad-5.c: New test.
+
2006-08-03 Lee Millward <lee.millward@codesourcery.com>
- PR c++/28347
- * g++.dg/ext/typedef-init.C: Add new test for typedef
- initialization inside templates. Adjust existing
- error markers.
-
+ PR c++/28347
+ * g++.dg/ext/typedef-init.C: Add new test for typedef
+ initialization inside templates. Adjust existing error markers.
+
2006-08-03 Mark Mitchell <mark@codesourcery.com>
PR c++/28148
diff --git a/gcc/testsuite/gcc.dg/init-bad-5.c b/gcc/testsuite/gcc.dg/init-bad-5.c
new file mode 100644
index 0000000..18cee43
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/init-bad-5.c
@@ -0,0 +1,5 @@
+/* PR c/28136 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int i = (struct A[]) {}; /* { dg-error "incomplete|empty|initialization" } */