This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14361] Accepting invalid code with weird default parameter trailer.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2004 09:55:37 -0000
- Subject: [Bug c++/14361] Accepting invalid code with weird default parameter trailer.
- References: <20040301093844.14361.mattyt-bugzilla@tpg.com.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-01 09:55 -------
Confirmed a regression from 3.3.1, also note it is even worse than that.
this is accepted:
struct A {
A ( int n=0 ,int n1 );
};
And this is too:
struct A {
A ( int n=0 i );
};
Looks the parser is ignorning anything after the default argument until the ')' token.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |accepts-invalid
Known to fail| |3.4.0 3.5.0
Known to work| |3.3.1
Last reconfirmed|0000-00-00 00:00:00 |2004-03-01 09:55:36
date| |
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14361