bash-2.05b$ cat defarg.C
int f (int i, int j = 0);
int f (int i = 0, int j);
bash-2.05b$ ./cc1plus defarg.C  -quiet
defarg.C:2: error: default argument missing for parameter 2 of ‘int f(int,
int)’
defarg.C:2: error: default argument given for parameter 2 of ‘int f(int, int)’
defarg.C:1: error: after previous specification in ‘int f(int, int)’


-- 
           Summary: Redeclaration with extra default argument doesn't work
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28274

Reply via email to