public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15863] New: Nested class template lookup regression in 3.4-branch
@ 2004-06-07 23:00 gbeauchesne at mandrakesoft dot com
2004-06-07 23:09 ` [Bug c++/15863] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: gbeauchesne at mandrakesoft dot com @ 2004-06-07 23:00 UTC (permalink / raw)
To: gcc-bugs
Hi,
The following testcase is simplified from the wvstreams library + extra tests added. It fails with
current 3.4-branch though they are accepted by gcc 3.3.2, icc and Comeau C++.
[gb@n2 gcc]$ ./cc1plus --version
GNU C++ version 3.4.1 20040607 (prerelease) (i686-pc-linux-gnu)
[gb@n2 gcc]$ cat /home/gb/vrac/template2.cpp
// { dg-do compile }
// Simplified testcase from the wvstreams library
template< class K, class D >
struct A {
template< typename T >
struct B { };
struct I {
void f(void) {
A::B<K> k;
}
};
};
// Related tests?
template< typename K >
struct B {
template< int > struct X {};
template< typename T > struct C {};
struct V1 { B::X<0> x; };
struct V2 { B::C<int> c; };
struct V3 { void f() { B::X<0> x; } };
struct V4 { void f() { B::C<int> c; } };
};
[gb@n2 gcc]$ ./cc1plus ~/vrac/template2.cpp
void A<K, D>::I::f()
/home/gb/vrac/template2.cpp:11: error: expected primary-expression before '>' token
/home/gb/vrac/template2.cpp:11: error: `k' undeclared (first use this function)
/home/gb/vrac/template2.cpp:11: error: (Each undeclared identifier is reported only once for each
function it appears in.)
void B<K>::V3::f()
/home/gb/vrac/template2.cpp:24: error: `x' undeclared (first use this function)
void B<K>::V4::f()
/home/gb/vrac/template2.cpp:25: error: expected primary-expression before "int"
/home/gb/vrac/template2.cpp:25: error: expected `;' before "int"
--
Summary: Nested class template lookup regression in 3.4-branch
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gbeauchesne at mandrakesoft dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15863
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-07 23:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-07 23:00 [Bug c++/15863] New: Nested class template lookup regression in 3.4-branch gbeauchesne at mandrakesoft dot com
2004-06-07 23:09 ` [Bug c++/15863] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).