Message ID | 4FAA6E14.7060106@oracle.com |
---|---|
State | New |
Headers | show |
I think the problem is you really want to use EXPR_LOC_OR_HERE rather than location_of; if the argument happens to be a DECL, location_of will give you the declaration location rather than the use location. Jason
On 05/09/2012 03:20 PM, Jason Merrill wrote: > I think the problem is you really want to use EXPR_LOC_OR_HERE rather > than location_of; if the argument happens to be a DECL, location_of > will give you the declaration location rather than the use location. Ah! Thanks a lot, now all those small details I always see in the diagnostics are becoming much more clear ;) Let's see what I can do... Paolo.
Index: call.c =================================================================== --- call.c (revision 187290) +++ call.c (working copy) @@ -5704,7 +5704,7 @@ convert_like_real (conversion *convs, tree expr, t break; } - permerror (input_location, "invalid conversion from %qT to %qT", + permerror (location_of (expr), "invalid conversion from %qT to %qT", TREE_TYPE (expr), totype); if (fn) permerror (DECL_SOURCE_LOCATION (fn),