This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47144] New: Doesn't reject attempt to define type in template argument; results in weird parse
- From: "schaub.johannes at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 1 Jan 2011 06:03:18 +0000
- Subject: [Bug c++/47144] New: Doesn't reject attempt to define type in template argument; results in weird parse
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47144
Summary: Doesn't reject attempt to define type in template
argument; results in weird parse
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
GCC accepts the following:
template<typename> struct A { }; A< struct B { } >::SomeNonSense int y;
Seems like internally it creates the specialization for "A< ::B >", but its
parser goes mad at some part. It's not allowed to define types in template
arguments. C++03 seems to have missed to explicitly state that, but n3225 says
so explicitly.