diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-14 16:59:05 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-14 16:59:05 +0000 |
commit | 7ca909c695cf94388d30d13e46d829ae0bcea84d (patch) | |
tree | 107d66ef4eb8cce1efee494ba91a5442b067d48a /gcc/opts-common.c | |
parent | f87b2900a166626a523c77dbb6456ca9b8f71d24 (diff) | |
download | gcc-7ca909c695cf94388d30d13e46d829ae0bcea84d.tar.gz |
PR c/68833
* common.opt (Wmissing-noreturn): Add Warning option.
* opts-common.c (control_warning_option): If opt is
alias_target with alias_arg, set arg to it.
* c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
* c-c++-common/pr68833-1.c: New test.
* c-c++-common/pr68833-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231624 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r-- | gcc/opts-common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c index 507358a1d17..55b631586b5 100644 --- a/gcc/opts-common.c +++ b/gcc/opts-common.c @@ -1361,7 +1361,13 @@ control_warning_option (unsigned int opt_index, int kind, const char *arg, diagnostic_context *dc) { if (cl_options[opt_index].alias_target != N_OPTS) - opt_index = cl_options[opt_index].alias_target; + { + gcc_assert (!cl_options[opt_index].cl_separate_alias + && !cl_options[opt_index].cl_negative_alias); + if (cl_options[opt_index].alias_arg) + arg = cl_options[opt_index].alias_arg; + opt_index = cl_options[opt_index].alias_target; + } if (opt_index == OPT_SPECIAL_ignore) return; if (dc) |