diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-07-23 15:57:49 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-07-23 15:57:49 +0000 |
commit | fcf73884fb9b2a6ae5518beb715b3e6fd3161699 (patch) | |
tree | f00173dd9740a4ee5b51d4737ab407c93e441bcc /gcc/c-errors.c | |
parent | 554cd17b8d4df5ad1f58a68fdce3e9d8c5d56566 (diff) | |
download | gcc-fcf73884fb9b2a6ae5518beb715b3e6fd3161699.zip gcc-fcf73884fb9b2a6ae5518beb715b3e6fd3161699.tar.gz gcc-fcf73884fb9b2a6ae5518beb715b3e6fd3161699.tar.bz2 |
re PR c/35058 (-Werror= works only with some warnings)
2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 35058
* diagnostic.c (pedwarn): Add opt parameter.
(pedwarn0): New.
* c-tree.h (pedwarn_init): Add opt parameter.
(pedwarn_c90): Likewise.
(pedwarn_c99): Likewise.
* c-errors.c (pedwarn_c99): Likewise.
(pedwarn_c90): Likewise.
* toplev.h (pedwarn): Update declaration.
(pedwarn0): Declare.
* c-lex.c: All calls to pedwarn changed.
* builtins.c: All calls to pedwarn changed.
* toplev.c: All calls to pedwarn changed.
* c-decl.c: All calls to pedwarn changed.
* c-typeck.c: All calls to pedwarn changed.
* c-common.c: All calls to pedwarn changed.
* c-parser.c: All calls to pedwarn changed.
cp/
* typeck.c: All calls to pedwarn changed.
* decl.c: All calls to pedwarn changed.
* call.c: All calls to pedwarn changed.
* error.c: All calls to pedwarn changed.
* typeck2.c: All calls to pedwarn changed.
* pt.c: All calls to pedwarn changed.
* name-lookup.c: All calls to pedwarn changed.
* parser.c: All calls to pedwarn changed.
fortran/
* f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
testsuite/
* gcc.dg/Wdeclaration-after-statement-3.c: New.
* gcc/testsuite/gcc.dg/Wpointer-arith.c: New.
From-SVN: r138089
Diffstat (limited to 'gcc/c-errors.c')
-rw-r--r-- | gcc/c-errors.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/c-errors.c b/gcc/c-errors.c index dc47b76..8adeeeb 100644 --- a/gcc/c-errors.c +++ b/gcc/c-errors.c @@ -31,7 +31,7 @@ along with GCC; see the file COPYING3. If not see /* Issue an ISO C99 pedantic warning MSGID. */ void -pedwarn_c99 (const char *gmsgid, ...) +pedwarn_c99 (int opt, const char *gmsgid, ...) { diagnostic_info diagnostic; va_list ap; @@ -39,6 +39,7 @@ pedwarn_c99 (const char *gmsgid, ...) va_start (ap, gmsgid); diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, flag_isoc99 ? pedantic_warning_kind () : DK_WARNING); + diagnostic.option_index = opt; report_diagnostic (&diagnostic); va_end (ap); } @@ -49,7 +50,7 @@ pedwarn_c99 (const char *gmsgid, ...) (There is no flag_c90.) */ void -pedwarn_c90 (const char *gmsgid, ...) +pedwarn_c90 (int opt, const char *gmsgid, ...) { diagnostic_info diagnostic; va_list ap; @@ -57,6 +58,7 @@ pedwarn_c90 (const char *gmsgid, ...) va_start (ap, gmsgid); diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location, flag_isoc99 ? DK_WARNING : pedantic_warning_kind ()); + diagnostic.option_index = opt; report_diagnostic (&diagnostic); va_end (ap); } |