This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Set correct source location for deallocator calls
On 2012-08-10 10:21, Dehao Chen wrote:
> Yes, cxx_maybe_build_cleanup sets it to UNKNOWN_LOCATION, but during
> gimplifying, it's reset to input_location:
>
> gimplify.c (gimplify_call_expr)
> 2486 /* For reliable diagnostics during inlining, it is necessary that
> 2487 every call_expr be annotated with file and line. */
> 2488 if (! EXPR_HAS_LOCATION (*expr_p))
> 2489 SET_EXPR_LOCATION (*expr_p, input_location);
>
> Shall we remove this code? Because I don't expect the location to be
> unknown in other cases.
Hmm. Perhaps something special-cased to TRY_FINALLY/TRY_CATCH
to set input_location itself to UNKNOWN_LOCATION for the duration
of gimplifying the cleanup? With a big comment about how we'll be
setting unset locations for cleanups during tree-eh lowering.
r~