This is the mail archive of the
mailing list for the GCC project.
Re: [C++ Patch] Improve finish_pseudo_destructor_expr location
- From: Richard Biener <richard dot guenther at gmail dot com>
- 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>, Jason Merrill <jason at redhat dot com>
- Date: Thu, 12 Sep 2013 16:12:11 +0200
- Subject: Re: [C++ Patch] Improve finish_pseudo_destructor_expr location
- Authentication-results: sourceware.org; auth=none
- References: <5230C454 dot 7060202 at oracle dot com>
On Wed, Sep 11, 2013 at 9:28 PM, Paolo Carlini <firstname.lastname@example.org> wrote:
> when yesterday I analyzed a bit c++/58363 and eventually I committed a
> pretty printing fix I noticed that the column was wrong for the pseudo
> destructor expression m.~f, pointing at the end. A fix turns out to be
> rather simple, because finish_pseudo_destructor_expr was simply not getting
> a location_t argument, I think it's also rather complete vs templates,
> otherwise it would not do the right thing for c++/58363 itself for example,
> when the error message is produced by unify_arg_conversion.
> Note, in tsubst_copy_and_build I simply pass input_location, not
> EXPR_LOCATION (t), which would cause a regression for the error @ line 22 of
> pseudodtor3.C (because the location of t is UNKNOWN at that point during
> substitution whereas in fact the final location of the error messages was
> already Ok), neither EXPR_LOC_OR_HERE, which would buy nothing because
> tsubst_copy_and_build at the beginning has code which assigns input_location
> the EXPR_LOCATION (t), in case it's known.
> Tested x86_64-linux.
cp-tree.h misisng in commit and changelog.