This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/29888] New: No error when "too few arguments" or "conflicting types" would be expected


Compiling the following code snippet gives no errors:

int main(){
  foo();
  return 0;
}
int foo(int x){
  return 0;
}

If return type of foo is changed to void, it gives the following errors: (which
i think would be the expected in the first case, too)

wtf.c:7: error: conflicting types for 'foo'
wtf.c:3: error: previous implicit declaration of 'foo' was here

Tested on 3.4.5 and 4.1.1


-- 
           Summary: No error when "too few arguments" or "conflicting types"
                    would be expected
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: alexer at mbnet dot fi


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]