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: Wold-style-declaration (PR7651 Define -Wextra strictly in terms of other warning flags)


"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


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