This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Wold-style-declaration (PR7651 Define -Wextra strictly in terms of other warning flags)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 29 Dec 2006 19:52:56 +0100
- Subject: Re: Wold-style-declaration (PR7651 Define -Wextra strictly in terms of other warning flags)
- References: <6c33472e0612291034n90522d8w3bc1994cbc6836df@mail.gmail.com>
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:
| :ADDPATCH c:
|
| This patch continues the effort to fix PR7651 [1].
|
| A new option -Wold-style-declaration takes over the warning about
| storage-class specifiers like "static" that are not the first things
| in a declaration. I have generalized the description a bit more, so it
| could encompass any other obsolescent usage in a declaration. This
| patch also updates the documentation to reflect that the warning only
| applies to C.
I can see how this flag can apply to C++ -- think of deprecated
"static non-local variable declaration", which should be written as
members of unnamed namespaces -- but that is for another day.
| The new option is enabled by -Wextra, so we keep the
| current behaviour but add the ability to enable/disable this
| individual warning.
|
| Bootstrapped and regression tested with --enable-languages=all on
| i686-pc-linux-gnu.
|
| OK for mainline?
Yes.
-- Gaby