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