mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-19 10:49:58 +08:00
re PR c++/37563 (Trouble calling qualified member function)
PR c++/37563 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor name is not a declaration. From-SVN: r142015
This commit is contained in:
parent
da3933ba83
commit
2de6c675d3
@ -1,5 +1,9 @@
|
||||
2008-11-19 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/37563
|
||||
* parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
|
||||
name is not a declaration.
|
||||
|
||||
PR c++/37256
|
||||
* pt.c (instantiate_decl): Don't require a definition of
|
||||
a template that is explicitly instantiated 'extern'.
|
||||
|
@ -5264,7 +5264,7 @@ cp_parser_pseudo_destructor_name (cp_parser* parser,
|
||||
/*typename_keyword_p=*/false,
|
||||
/*check_dependency_p=*/true,
|
||||
/*type_p=*/false,
|
||||
/*is_declaration=*/true)
|
||||
/*is_declaration=*/false)
|
||||
!= NULL_TREE);
|
||||
/* Now, if we saw a nested-name-specifier, we might be doing the
|
||||
second production. */
|
||||
|
@ -1,5 +1,8 @@
|
||||
2008-11-19 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/37563
|
||||
* g++.dg/template/pseudodtor5.C: New test.
|
||||
|
||||
PR c++/37256
|
||||
* g++.dg/cpp0x/extern_template-3.C: New test.
|
||||
|
||||
|
23
gcc/testsuite/g++.dg/template/pseudodtor5.C
Normal file
23
gcc/testsuite/g++.dg/template/pseudodtor5.C
Normal file
@ -0,0 +1,23 @@
|
||||
// PR c++/37563
|
||||
|
||||
struct A {};
|
||||
|
||||
template<int> struct Traits
|
||||
{
|
||||
typedef void X;
|
||||
};
|
||||
|
||||
template<> struct Traits<0>
|
||||
{
|
||||
typedef A X;
|
||||
};
|
||||
|
||||
template<int N> struct B
|
||||
{
|
||||
typedef typename Traits<N>::X Y;
|
||||
|
||||
void foo(Y y)
|
||||
{
|
||||
y.Y::A::~A();
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user