This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48091] No warning when given function arguments mismatch earlier function definition which GCC assumes to be K&R, even with --std=c99 -pedantic
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Jan 2017 16:47:26 +0000
- Subject: [Bug c/48091] No warning when given function arguments mismatch earlier function definition which GCC assumes to be K&R, even with --std=c99 -pedantic
- Auto-submitted: auto-generated
- References: <bug-48091-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48091
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
OK, but as the reporter of 64526 said, we should warn at least. We know the
number of parameters (even if there isn't a prototype) and we know the number
of arguments doesn't match it. That warrants a warning.