diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-12-14 17:59:05 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-12-14 17:59:05 +0100 |
commit | 54d62f5148febdf714fa374a10a72c73850ed6bb (patch) | |
tree | 107d66ef4eb8cce1efee494ba91a5442b067d48a /gcc/opts-common.c | |
parent | d84ffc0a56d84a02929fa67d2edb52d4b81fab37 (diff) | |
download | gcc-54d62f5148febdf714fa374a10a72c73850ed6bb.zip gcc-54d62f5148febdf714fa374a10a72c73850ed6bb.tar.gz gcc-54d62f5148febdf714fa374a10a72c73850ed6bb.tar.bz2 |
re PR c/68833 (-Werror=format issues an error now)
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.
From-SVN: r231624
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 507358a..55b6315 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) |