PR c/49120
* c-decl.c (start_decl): Convert expr to void_type_node.
* gcc.dg/pr49120.c: New test.
From-SVN: r174081
+2011-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/49120
+ * c-decl.c (start_decl): Convert expr to void_type_node.
+
2011-05-23 Richard Sandiford <rdsandiford@googlemail.com>
PR rtl-optimization/48826
return 0;
if (expr)
- add_stmt (expr);
+ add_stmt (fold_convert (void_type_node, expr));
if (TREE_CODE (decl) != FUNCTION_DECL && MAIN_NAME_P (DECL_NAME (decl)))
warning (OPT_Wmain, "%q+D is usually a function", decl);
+2011-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/49120
+ * gcc.dg/pr49120.c: New test.
+
2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/47315
--- /dev/null
+/* PR c/49120 */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+int
+main ()
+{
+ int a = 1;
+ int c = ({ char b[a + 1]; b[0] = 0; b[0]; });
+ return c;
+}