This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Recognize -Wextra, update manual.
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Phil Edwards <phil at jaj dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 7 Jun 2002 22:54:05 +0100 (BST)
- Subject: Re: [PATCH] Recognize -Wextra, update manual.
On Fri, 7 Jun 2002, Zack Weinberg wrote:
> > +@item
> > +A variable is declared without a type specifier (``implicit int'').
>
> Does this mean without any type specifiers at all ("foo;"), or with a
> modifier only ("unsigned foo;")? The warning for the former should be
> a bit more prominent; the feature was removed (not deprecated,
> removed) in C99.
The case of implicit int that is in -W (and is unconditionally warned for
in C99 mode) is undeclared old-style function parameters defaulting to
int. The case of no type specifiers ("extern foo;") is -Wimplicit-int
which is part of -Wall; it would be reasonable for the case of undeclared
parameters ("void foo(bar){}") to join -Wimplicit-int, as part of
reviewing which cases ought to be in -Wall.
--
Joseph S. Myers
jsm28@cam.ac.uk