[Bug c++/14361] Accepting invalid code with weird default parameter trailer.

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 1 09:55:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list