PR c/17023
* c-decl.c (store_parm_decls_oldstyle): Care for parameter type
as error_mark_node.
* c-parse.in (compstmt_primary_start): Check cur_stmt_list non-null
instaed of current_function_decl non-null.
From-SVN: r89063
+2004-10-14 Richard Henderson <rth@redhat.com>
+
+ PR c/17023
+ * c-decl.c (store_parm_decls_oldstyle): Care for parameter type
+ as error_mark_node.
+ * c-parse.in (compstmt_primary_start): Check cur_stmt_list non-null
+ instaed of current_function_decl non-null.
+
2004-10-14 Matt Austern <austern@apple.com>
* pointer-set.c: New file, special-purpose hash table.
if (TREE_CODE (parm) != PARM_DECL)
continue;
- if (!COMPLETE_TYPE_P (TREE_TYPE (parm)))
+ if (TREE_TYPE (parm) != error_mark_node
+ && !COMPLETE_TYPE_P (TREE_TYPE (parm)))
{
error ("%Jparameter %qD has incomplete type", parm, parm);
TREE_TYPE (parm) = error_mark_node;
compstmt_primary_start:
'(' '{'
- { if (current_function_decl == 0)
+ { if (cur_stmt_list == NULL)
{
error ("braced-group within expression allowed "
"only inside a function");
--- /dev/null
+/* PR c/17023 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void
+f(a, b)
+ int a;
+ int b[({ void h() {} 1; })]; /* { dg-error "braced-group" } */
+{
+}