This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: C: Add new warning -Wunprototyped-calls


Richard Biener <richard.guenther@gmail.com> writes:

> On Mon, Apr 8, 2013 at 3:05 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Richard Biener <richard.guenther@gmail.com> writes:
>>
>>> when a "real prototype" was visible
>>
>> How is that different from a prototype?
>
> It's different from the case where a K&R definition was seen and thus
> type information is present via that mechanism.  We don't want to
> warn in that case.

But that isn't a prototype.

> As I suggested, the warning should just print "without a prototype"
> but "prototype" here means that a definition before the call is
> enough to make us happy (as opposed to -Wstrict-prototypes which
> warns about function definitions without a previous prototype we
> want to warn about calls to functions without a definition or a prototype).

How does a definition help here if it isn't a prototype?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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