This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29888] New: No error when "too few arguments" or "conflicting types" would be expected
- From: "alexer at mbnet dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2006 15:29:04 -0000
- Subject: [Bug c/29888] New: No error when "too few arguments" or "conflicting types" would be expected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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