This is the mail archive of the
mailing list for the GCC project.
Re: C: Add new warning -Wunprototyped-calls
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Tobias Burnus <burnus at net-b dot de>, gcc patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Mon, 08 Apr 2013 15:44:04 +0200
- Subject: Re: C: Add new warning -Wunprototyped-calls
- References: <5160963D dot 6090308 at net-b dot de> <m2zjxbib1w dot fsf at igel dot home> <CAFiYyc2FAX-0GL-uz+qDM4FYNGtgo63ExCWNeo4ze08xJwt=1g at mail dot gmail dot com> <mvmmwt9xjdo dot fsf at hawking dot suse dot de> <CAFiYyc0MnOgEasu0EWTjamBg5vaRjBCBFedqACqYE8vM3-ajgw at mail dot gmail dot com>
Richard Biener <email@example.com> writes:
> On Mon, Apr 8, 2013 at 3:05 PM, Andreas Schwab <firstname.lastname@example.org> wrote:
>> Richard Biener <email@example.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 Schwab, firstname.lastname@example.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."