This is the mail archive of the
mailing list for the GCC project.
Re: [diagnostic patch] PR 54941
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 8 Sep 2013 09:07:44 -0500
- Subject: Re: [diagnostic patch] PR 54941
- Authentication-results: sourceware.org; auth=none
- References: <522C74E1 dot 50305 at oracle dot com> <CAAiZkiAVnAEAB=TWuvfuaifzkBE9gLwzg86eUk+gsqVbfc7Cmw at mail dot gmail dot com> <522C82DE dot 50703 at oracle dot com>
On Sun, Sep 8, 2013 at 8:59 AM, Paolo Carlini <email@example.com> wrote:
> Hi Gaby,
> On 09/08/2013 03:41 PM, Gabriel Dos Reis wrote:
>> On Sun, Sep 8, 2013 at 8:00 AM, Paolo Carlini <firstname.lastname@example.org>
>>> Hi all, Gaby,
>>> in this bug Manuel noticed that the zeros in the diagnostic lines of the
>>> <built-in>:0:0: ....
>>> don't provide useful information. Thus the below just avoids printing the
>>> zeros basing directly on the file name: admittedly, it may seem a bit
>>> but in practice the strcmp would often fail early, and should be rather
>>> efficient anyway because the second argument is known at compile-time.
>> For builtins, we probably do not want to print the line number
>> and the column number (both of which are zero).
> I agree. This is exactly what my patch does, isn't it?
What I meant is that we should not showing a location at all.
I misread the original hunk
+ : !strcmp (s.file, N_("<built-in>"))
+ ? build_message_string ("%s%s:%s %s%s%s", locus_cs, s.file, locus_ce,
+ text_cs, text, text_ce)
Sorry. Patch OK.