This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47144] [4.5 Regression] Doesn't reject attempt to define type in template argument; results in weird parse
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 1 Jan 2011 18:05:28 +0000
- Subject: [Bug c++/47144] [4.5 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
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.01 18:05:20
Known to work| |4.4.5
Summary|Doesn't reject attempt to |[4.5 Regression] Doesn't
|define type in template |reject attempt to define
|argument; results in weird |type in template argument;
|parse |results in weird parse
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-01 18:05:20 UTC ---
4.4 rejects it:
inv.cc:1: error: expected class-name before âintâ
inv.cc:1: error: expected â(â before âintâ
4.5 accepts it without error
current 4.6 rejects it with the following
inv.cc:1:48: error: expected â;â after struct definition
inv.cc:1:48: error: expected template-argument before â;â token
inv.cc:1:48: error: expected â>â before â;â token
inv.cc:1:48: error: expected â::â before â;â token
inv.cc:1:48: error: expected unqualified-id before â;â token
inv.cc:1:48: error: declaration does not declare anything [-fpermissive]
inv.cc:1:50: error: expected unqualified-id before â>â token
what 4.6.0 version are you using?