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-lex.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-lex.c')
-rw-r--r-- | gcc/c-lex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 9446916..e49e331 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -587,8 +587,8 @@ interpret_integer (const cpp_token *token, unsigned int flags) if (itk > itk_unsigned_long && (flags & CPP_N_WIDTH) != CPP_N_LARGE && !in_system_header && !flag_isoc99) - pedwarn ("integer constant is too large for %qs type", - (flags & CPP_N_UNSIGNED) ? "unsigned long" : "long"); + pedwarn (0, "integer constant is too large for %qs type", + (flags & CPP_N_UNSIGNED) ? "unsigned long" : "long"); value = build_int_cst_wide (type, integer.low, integer.high); @@ -641,8 +641,8 @@ interpret_float (const cpp_token *token, unsigned int flags) return error_mark_node; } - else if (pedantic) - pedwarn ("non-standard suffix on floating constant"); + else + pedwarn (OPT_pedantic, "non-standard suffix on floating constant"); type = c_common_type_for_mode (mode, 0); gcc_assert (type); @@ -684,7 +684,7 @@ interpret_float (const cpp_token *token, unsigned int flags) if (REAL_VALUE_ISINF (real)) { if (!MODE_HAS_INFINITIES (TYPE_MODE (type))) - pedwarn ("floating constant exceeds range of %qT", type); + pedwarn (0, "floating constant exceeds range of %qT", type); else warning (OPT_Woverflow, "floating constant exceeds range of %qT", type); } |