This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -Werror= handling for Joined warnings, add a few missing Warning keywords (PRs c/48088, c/68657)
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 4 Dec 2015 18:19:19 +0000
- Subject: Re: [PATCH] Fix -Werror= handling for Joined warnings, add a few missing Warning keywords (PRs c/48088, c/68657)
- Authentication-results: sourceware.org; auth=none
- References: <20151204163729 dot GO5675 at tucnak dot redhat dot com> <5661C706 dot 3040601 at redhat dot com> <20151204175343 dot GR5675 at tucnak dot redhat dot com>
On 4 December 2015 at 17:53, Jakub Jelinek <jakub@redhat.com> wrote:
> +
> + if (e->unknown_error)
> + error_at (loc, e->unknown_error, option->opt_text);
> + else
> + error_at (loc, "unrecognized argument in option %qs",
> + option->opt_text);
The same code that handles command-line options has:
if (e->unknown_error)
error_at (loc, e->unknown_error, decoded->arg);
else
error_at (loc, "unrecognized argument in option %qs", opt);
My guess is that the first error_at should use arg instead of
option->opt_text to be equivalent. Of course, ideally, this code would
not be duplicated, but rather merged "somehow".
Cheers,
Manuel.