This is the mail archive of the gcc@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]

Re: Should we make "implicit declaration of function" a mandatorywarning?


On Sun, 14 Jan 2001, Zack Weinberg wrote:

> which makes quite clear that something's wrong.  What do people think
> of promoting the "implicit declaration of function" warning to
> mandatory?  These days it is far more likely to be a bug than
> unregenerate K+R code...
>
> Note that implicit declarations were removed from C99.

At least turn the warning on by default for C99 mode (not just pedantic &&
flag_isoc99 as at present).  Then it will be on by default when we move to
gnu99 as default mode.

The most likely case these days is actually probably going to be that the
program is a quick hack (otherwise -Wall should be used), and the return
value isn't being used so the programmer doesn't really care.

Perhaps the GCC manual, the bug reporting instructions, and the glibc
manual, should emphasise to use -Wall before reporting that code works
wrongly?

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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