summaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-06-11 14:29:53 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-06-11 12:29:53 +0000
commit7ea6b6cf97363a0f4dfb1a72a7cda31c59350bbc (patch)
treeb9d5e6003412755a9b91c08dbafc60f251457051 /gcc/opts.c
parent2ee3cb3591bfa67a216efe877ddcfca65851bbc8 (diff)
downloadgcc-7ea6b6cf97363a0f4dfb1a72a7cda31c59350bbc.tar.gz
invoke.texi (Wsuggest-attribute): Document.
* doc/invoke.texi (Wsuggest-attribute): Document. (Wmissing-noreturn): Remove. * ipa-pure-const.c (warn_function_noreturn): New function. * opts.c (decode_options): Set warn_suggest_attribute_noreturn on warn_missing_noreturn. * common.opt (Wsuggest-attribute=noreturn): New. * tree-flow.h (warn_function_noreturn): Declare. * tree-cfg.c (execute_warn_function_noreturn): Use warn_function_noreturn. (gate_warn_function_noreturn): New. (pass_warn_function_noreturn): Update. From-SVN: r160606
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 8699ec33703..e304ce5c94b 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1062,6 +1062,11 @@ decode_options (unsigned int argc, const char **argv)
"is disabled.");
flag_toplevel_reorder = 0;
}
+
+ /* -Wmissing-noreturn is alias for -Wsuggest-attribute=noreturn. */
+ if (warn_missing_noreturn)
+ warn_suggest_attribute_noreturn = true;
+
/* Unless the user has asked for section anchors, we disable toplevel
reordering at -O0 to disable transformations that might be surprising
to end users and to get -fno-toplevel-reorder tested. */