This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47144] [4.5, 4.6 Regression] Doesn't reject attempt to define type in template argument; results in weird parse
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 1 Jan 2011 20:11:17 +0000
- Subject: [Bug c++/47144] [4.5, 4.6 Regression] Doesn't reject attempt to define type in template argument; results in weird parse
- Auto-submitted: auto-generated
- References: <bug-47144-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47144
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
Target Milestone|--- |4.5.3
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-01 20:11:07 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > Ah I see. Have you found any combination of this that fails on trunk? Could be
> > worth putting it here. Maybe adding declarators prevents it from wanting to see
> > a semicolon?
> >
> > template<typename> struct A { }; A< struct B { }* >::SomeNonSense int y;
>
> Good thinking - that is rejected by 4.4 but accepted by 4.5 and 4.6
>
> I've added 4.6 to the subject
It is caused by revision 154403:
http://gcc.gnu.org/ml/gcc-cvs/2009-11/msg00624.html