public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gbeauchesne at mandrakesoft dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/15863] New: Nested class template lookup regression in 3.4-branch Date: Mon, 07 Jun 2004 23:00:00 -0000 [thread overview] Message-ID: <20040607230042.15863.gbeauchesne@mandrakesoft.com> (raw) 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
next reply other threads:[~2004-06-07 23:00 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-06-07 23:00 gbeauchesne at mandrakesoft dot com [this message] 2004-06-07 23:09 ` [Bug c++/15863] " pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040607230042.15863.gbeauchesne@mandrakesoft.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).