This is the mail archive of the
mailing list for the GCC project.
Re: C: Add new warning -Wunprototyped-calls
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- 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, 8 Apr 2013 15:12:39 +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>
On Mon, Apr 8, 2013 at 3:05 PM, Andreas Schwab <email@example.com> wrote:
> Richard Biener <firstname.lastname@example.org> 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.
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).
Any better suggestion?
> Andreas Schwab, email@example.com
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."