This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Remove non-mapped location support
On 25/02/2008, Tom Tromey <tromey@redhat.com> wrote:
>
> I do like the layer of indirection provided by having the diagnostic
> machinery know how to extract the location from a tree. I may need
> this for the incremental compiler, though I'm not certain yet.
But that can be factor out in a function. Then you could call:
error (location (binary_op),
"invalid operands to binary %s (have %qT and %qT)", opname,
type0, type1);
My point is that having
error ("%Hinvalid operands to binary %s (have %qT and %qT)",
location (binary_op), opname, type0, type1);
is both more prone to mistakes (people will forget to use %H) and also
is less clear (and uglier).
Am I misunderstanding you?
Cheers,
Manuel.