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

--- Comment #2 from Eero Tamminen <eerott at gmail dot com> 2011-03-17 21:08:41 
UTC ---
(In reply to comment #1)
> That's how K&R works.  The function definition isn't a prototype.

Why that would be a valid excuse not to give a warning when function call
either doesn't match or isn't known by GCC to match what the function accepts? 
That makes no sense, especially when I'm requesting -Wall/-Wextra and/or
pedantic C99 checking...

It's dangerous behavior and makes GCC look bad compared to about any other
compiler that hasn't died on previous century. User might not know that the
code he's compiling happens to contain (mismatching) K&R function definitions,
silently hiding such errors when user has requested stricter checking is evil.

GCC should of course still accept K&R code (in case there's still K&R code that
isn't dead or fixed), this bug is about giving warnings when function call
doesn't match what GCC knows about the function.

If somebody doesn't want warnings on K&R function definitions (which became
obsolete 22 years ago), they can always specifically disable such warnings. 
Newer GCC being more strict and giving more warnings on the same code shouldn't
come as a surprise to anybody.

Reply via email to