[Bug c++/47144] [4.5 Regression] Doesn't reject attempt to define type in template argument; results in weird parse
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 1 18:05:00 GMT 2011
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?
More information about the Gcc-bugs
mailing list