+2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
+
+ Fix PR/7504
+ * parse.y (parse_finish_call_expr): Handle incomplete
+ type used to name a scope.
+
2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7598
fn = lookup_namespace_name (scope, name);
else
{
- if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
+ if (!COMPLETE_TYPE_P (scope) && !TYPE_BEING_DEFINED (scope))
+ {
+ error ("incomplete type '%T' cannot be used to name a scope",
+ scope);
+ return error_mark_node;
+ }
+ else if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
{
template_id = name;
template_args = TREE_OPERAND (name, 1);
--- /dev/null
+// Copyright (C) 2002 Free Software Foundation
+// Origin: jmr@fulcrummicro.com
+// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+
+struct A;
+
+int main()
+{
+ A::g(); // { dg-error "incomplete" "" }
+}
+