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] | |
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. 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.
PR middle-end/7651 * c.opt (Wold-style-declaration): New. * doc/invoke.texi (C-only Warning Options): New. (Wold-style-declaration): Document it. (Wextra): Enabled by -Wextra. * c-opts.c (c_common_post_options): Enabled by -Wextra. * c-decl.c (declspecs_add_scspec): Replace -Wextra with -Wold-style-declaration.
testsuite/ 2006-12-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651 * gcc.dg/declspec-3.c: Replace -W with -Wold-style-declaration. * gcc.dg/declspec-3-Wextra.c: New. * gcc.dg/declspec-3-no.c: New
Attachment:
wold-style-declaration.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |