diff options
author | DJ Delorie <dj@redhat.com> | 2005-05-25 03:59:00 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-05-25 03:59:00 +0000 |
commit | d2291d2206c095a305415d676ff231086428e326 (patch) | |
tree | 9643535c0dbab111233baa2e45e430fa4ca4774d /gcc/c-lex.c | |
parent | bc0d35c6b71fe0900877e8ceeefc944e0bc74945 (diff) |
* c-common.c (unsigned_conversion_warning): Move warning control
from if() to warning(OPT_*).
(c_common_truthvalue_conversion): Likewise.
(c_do_switch_warnings): Likewise.
* c-decl.c (diagnose_mismatched_decls): Likewise.
(diagnose_mismatched_decls): Likewise.
(define_label): Likewise.
(grokdeclarator): Likewise.
* c-format.c (check_format_info): Likewise.
* c-lex.c (interpret_integer): Likwise.
(lex_string): Likewise.
* c-opts.c (c_common_post_options): Likewise.
* c-parser.c (c_parser_unary_expression): Likewise.
* c-pragma.c (handle_pragma_redefine_extname): Likewise.
(handle_pragma_extern_prefix): Likewise.
* c-typeck.c (build_binary_op): Likewise.
* gcse.c (is_too_expensive): Likewise.
* opts.c (decode_options): Likewise.
* stor-layout.c (place_field): Likewise.
* tree-cfg.c (remove_bb): Likewise.
* c.opt (-Wreturn-type): Add Var(warn_return_type).
* flags.h (warn_return_type): Remove.
* toplev.c (warn_return_type): Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100135 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 990d2bee455..052c3f69122 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -599,8 +599,9 @@ interpret_integer (const cpp_token *token, unsigned int flags) itk = itk_u; warning (0, "this decimal constant is unsigned only in ISO C90"); } - else if (warn_traditional) - warning (0, "this decimal constant would be unsigned in ISO C90"); + else + warning (OPT_Wtraditional, + "this decimal constant would be unsigned in ISO C90"); } } } @@ -763,8 +764,9 @@ lex_string (const cpp_token *tok, tree *valp, bool objc_string) if (concats) strs = (cpp_string *) obstack_finish (&str_ob); - if (concats && !objc_string && warn_traditional && !in_system_header) - warning (0, "traditional C rejects string constant concatenation"); + if (concats && !objc_string && !in_system_header) + warning (OPT_Wtraditional, + "traditional C rejects string constant concatenation"); if ((c_lex_string_translate ? cpp_interpret_string : cpp_interpret_string_notranslate) |