This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36813] New: screwy diagnostic on ill-formed call from template with a local typedef
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2008 19:05:39 -0000
- Subject: [Bug c++/36813] New: screwy diagnostic on ill-formed call from template with a local typedef
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The second error message issued by gcc 4.3.0 for the ill-formed program below
looks wrong. I would expect it to read the same as the first one.
$ cat t.cpp && g++ t.cpp
template <class T> struct A { };
template <class T, class U> struct B { typedef A<T> Y; };
template <class T> void foo (T*) { }
template <class T, class U>
void bar () {
foo (typename B<T, U>::Y ());
typedef typename B<T, U>::Y Y;
foo (Y ()); // line 11
}
int main () {
bar<int, A<int> >();
}
t.cpp: In function ?void bar() [with T = int, U = A<int>]?:
t.cpp:15: instantiated from here
t.cpp:8: error: no matching function for call to ?foo(A<int>)?
t.cpp:11: error: no matching function for call to ?foo(bar() [with T = int, U =
A<int>]::Y)?
--
Summary: screwy diagnostic on ill-formed call from template with
a local typedef
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36813