This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9411: [3.4 regression] [New parser] Template function lookup problem
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mmitchel at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rguenth at tat dot physik dot uni-tuebingen dot de
- Date: 23 Jan 2003 00:32:27 -0000
- Subject: Re: c++/9411: [3.4 regression] [New parser] Template function lookup problem
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mmitchel at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rguenth at tat dot physik dot uni-tuebingen dot de, gcc-gnats at gcc dot gnu dot org
Old Synopsis: Template function lookup problem (new parser)
New Synopsis: [3.4 regression] [New parser] Template function lookup problem
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: bangerth
Responsible-Changed-When: Thu Jan 23 00:32:27 2003
Responsible-Changed-Why:
He's the new parser man.
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Jan 23 00:32:27 2003
State-Changed-Why:
Confirmed. Here's a slightly simpler snippet:
-----------------------
struct X {
template <class B> void foo(B);
};
template <class D>
void bar() {
X().foo<D>(1);
}
template void bar<int> ();
--------------------------------
We now get
g/a> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.cc
x.cc: In function `void bar() [with D = int]':
x.cc:10: instantiated from here
x.cc:7: error: no matching function for call to `X::foo(int)'
g/a> /home/bangerth/bin/gcc-3.3-pre/bin/gcc -c x.cc
It works on the 3.3 branch. This should really work, I'd
guess. Note that using "X().template foo<D>" also does no
good.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9411