On Thu, Aug 9, 2012 at 3:06 PM, Jason Merrill <ja...@redhat.com> wrote: > On 08/08/2012 12:32 PM, Richard Henderson wrote: >> >> On 08/08/2012 09:27 AM, Dehao Chen wrote: >>> >>> Then we should probably assign UNKNOWN_LOCATION for these destructor >>> calls, what do you guys think? >> >> >> I think it's certainly plausible. I can't think what other problems >> such a change would cause. Jason? > > > cxx_maybe_build_cleanup is already trying to do that. If it's missing some > cases then yes, let's fix them too.
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. Thanks, Dehao > > Jason >