This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10514: incorrect parsing of template instatiation with pointer-to-member variables
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gianni at mariani dot ws, nobody at gcc dot gnu dot org
- Date: 28 Apr 2003 13:56:14 -0000
- Subject: Re: c++/10514: incorrect parsing of template instatiation with pointer-to-member variables
- Reply-to: reichelt at igpm dot rwth-aachen dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gianni at mariani dot ws, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: incorrect parsing of template instatiation with pointer-to-member variables
State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Mon Apr 28 13:56:14 2003
State-Changed-Why:
Confirmed.
The parser hickups affect all release versions since 2.95.x,
as well as 3.3 branch and mainline.
BTW, not only using
i_1->A::TFUNC_A<w_a,w_b>( m_b1 );
but also writing
i_1->template TFUNC_A<w_a,w_b>( m_b1 );
makes the code compile.
The problem can also be demonstrated with the following code snippet:
============================snip here===============================
struct A
{
template <int> void foo() {}
};
struct B
{
template <int> void bar (A* p)
{
p->foo<0>(); // compiler trouble
}
void baz (A* p)
{
bar<0>(p);
}
};
============================snip here===============================
Regards,
Volker
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10514