summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-25 03:59:00 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-25 03:59:00 +0000
commit8b6866afc342340bd8d8674caf6d773afe0de5f1 (patch)
tree9643535c0dbab111233baa2e45e430fa4ca4774d /gcc/c-opts.c
parent06386baa96678e4b6bf4410164fb716943804b4d (diff)
downloadgcc-8b6866afc342340bd8d8674caf6d773afe0de5f1.tar.gz
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100135 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 62fec1a124a..a79933359fe 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -979,18 +979,21 @@ c_common_post_options (const char **pfilename)
/* Special format checking options don't work without -Wformat; warn if
they are used. */
- if (warn_format_y2k && !warn_format)
- warning (0, "-Wformat-y2k ignored without -Wformat");
- if (warn_format_extra_args && !warn_format)
- warning (0, "-Wformat-extra-args ignored without -Wformat");
- if (warn_format_zero_length && !warn_format)
- warning (0, "-Wformat-zero-length ignored without -Wformat");
- if (warn_format_nonliteral && !warn_format)
- warning (0, "-Wformat-nonliteral ignored without -Wformat");
- if (warn_format_security && !warn_format)
- warning (0, "-Wformat-security ignored without -Wformat");
- if (warn_missing_format_attribute && !warn_format)
- warning (0, "-Wmissing-format-attribute ignored without -Wformat");
+ if (!warn_format)
+ {
+ warning (OPT_Wformat_y2k,
+ "-Wformat-y2k ignored without -Wformat");
+ warning (OPT_Wformat_extra_args,
+ "-Wformat-extra-args ignored without -Wformat");
+ warning (OPT_Wformat_zero_length,
+ "-Wformat-zero-length ignored without -Wformat");
+ warning (OPT_Wformat_nonliteral,
+ "-Wformat-nonliteral ignored without -Wformat");
+ warning (OPT_Wformat_security,
+ "-Wformat-security ignored without -Wformat");
+ warning (OPT_Wmissing_format_attribute,
+ "-Wmissing-format-attribute ignored without -Wformat");
+ }
/* C99 requires special handling of complex multiplication and division;
-ffast-math and -fcx-limited-range are handled in process_options. */