Commit e8fe46d4 by Gabriel Dos Reis Committed by Gabriel Dos Reis

*** empty log message ***

From-SVN: r56347
parent eac5ce6c
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
......
......@@ -4133,7 +4133,13 @@ parse_finish_call_expr (tree fn, tree args, int koenig)
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);
......
// 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" "" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment