mirror of git://gcc.gnu.org/git/gcc.git
PR c++/9432, c++/9528
PR c++/9432, c++/9528 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF. * g++.dg/lookup/using4.C: New test. From-SVN: r66298
This commit is contained in:
parent
d1908febec
commit
d7ed5e55a2
|
@ -1,3 +1,8 @@
|
|||
2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/9432, c++/9528
|
||||
* decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
|
||||
|
||||
2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
|
||||
|
||||
* decl.c (check_previous_goto_1): Adjust prototype.
|
||||
|
|
|
@ -4236,6 +4236,14 @@ validate_nonmember_using_decl (tree decl, tree *scope, tree *name)
|
|||
return NULL_TREE;
|
||||
}
|
||||
|
||||
if (TREE_CODE (decl) == SCOPE_REF)
|
||||
{
|
||||
/* It's a nested name with template parameter dependent scope.
|
||||
This can only be using-declaration for class member. */
|
||||
error ("`%T' is not a namespace", TREE_OPERAND (decl, 0));
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
if (is_overloaded_fn (decl))
|
||||
decl = get_first_fn (decl);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/9432, c++/9528
|
||||
* g++.dg/lookup/using4.C: New test.
|
||||
|
||||
2003-04-29 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* gcc.dg/noreturn-5.c: New file.
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// { dg-do compile }
|
||||
|
||||
// Origin: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
|
||||
|
||||
// PR c++/9432: ICE in validate_nonmember_using_decl when decl is a
|
||||
// SCOPE_REF.
|
||||
|
||||
template <class T> struct Foo;
|
||||
template <class T>
|
||||
struct Bar : public Foo<T> {
|
||||
void foo()
|
||||
{
|
||||
using Foo<T>::i; // { dg-error "not a namespace" }
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue