*** empty log message ***
From-SVN: r56347
This commit is contained in:
parent
eac5ce6c93
commit
e8fe46d4d6
@ -1,3 +1,9 @@
|
||||
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);
|
||||
|
12
gcc/testsuite/g++.dg/expr/member-of-incomplete-type-1.C
Normal file
12
gcc/testsuite/g++.dg/expr/member-of-incomplete-type-1.C
Normal file
@ -0,0 +1,12 @@
|
||||
// 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" "" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user