This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] location_tize diagnostics
Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
> Zack Weinberg <zack@codesourcery.com> writes:
> | By the way, can we have a distinguished location_t value that means
> | 'don't print a file and line, print "cc1:"' ?
>
> we could manage to have location.file == NULL && location.line == 0
> imply prefix == programname.
We need a distinguished value for <internal> as well; it would be nice
not to be printing meaningless line numbers for that, and there's been
the problems with people doing strcmp(location.file, "<internal>") and
breaking under I18N.
This can wait until we go to line maps, as planned, then it'll be easy
to have as many special location_t values as we need.
zw