+2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/23089
+ * decl.c (require_complete_types_for_parms): Mark incomplete types
+ as invalid.
+
2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* parser.c (cp_parser_nth_token_starts_template_argument_list_p):
{
if (dependent_type_p (TREE_TYPE (parms)))
continue;
- if (VOID_TYPE_P (TREE_TYPE (parms)))
- /* grokparms will have already issued an error. */
- TREE_TYPE (parms) = error_mark_node;
- else if (complete_type_or_else (TREE_TYPE (parms), parms))
+ if (!VOID_TYPE_P (TREE_TYPE (parms))
+ && complete_type_or_else (TREE_TYPE (parms), parms))
{
relayout_decl (parms);
DECL_ARG_TYPE (parms) = type_passed_as (TREE_TYPE (parms));
}
+ else
+ /* grokparms or complete_type_or_else will have already issued
+ an error. */
+ TREE_TYPE (parms) = error_mark_node;
}
}
+2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/23089
+ * g++.dg/other/incomplete1.C: New test.
+
2005-08-22 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/vect-22.c: Add test for float. All four loops
--- /dev/null
+// PR c++/23089
+// Origin: Flash Sheridan <flash@pobox.com>
+// ICE on incomplete type
+// { dg-do compile }
+// { dg-options "-O" }
+
+void foo(struct A) {} // { dg-error "incomplete type|forward declaration" }