This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fdiagnostics-color=never does not disable color for some diagnostics
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>
- Date: Thu, 24 Sep 2015 17:32:45 +0200
- Subject: Re: fdiagnostics-color=never does not disable color for some diagnostics
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQDMkfkgu-4kcZhCM_qSzYNiOXZYaub1UySf7JOMynYSqA at mail dot gmail dot com> <5603F547 dot 2060302 at redhat dot com>
On 24 September 2015 at 15:06, Jason Merrill <jason@redhat.com> wrote:
> On 09/22/2015 04:23 PM, Manuel LÃpez-IbÃÃez wrote:
>>
>> + error_at (loc, "-Werror=%s: no option -%s", arg, new_option);
>> + else if (!(cl_options[option_index].flags & CL_WARNING))
>> + error_at (loc, "-Werror=%s: -%s is not an option that controls
>> warnings",
>
>
> Won't these incorrectly start with "-Werror=Wsomething:" rather than the
> "-Werror=something" that the user wrote?
They follow the pattern of the code they replace:
- {
- error_at (loc, "-Werror=%s: no option -%s", arg, new_option);
- }
where 'arg' is what the user wrote after '=', and new_option is:
new_option[0] = 'W';
strcpy (new_option + 1, arg);
Or am I misunderstanding you?
Cheers,
Manuel.