@@ -8669,6 +8669,10 @@ convert_like_internal (conversion *convs, tree expr, tree fn, int argnum,
rvalue, but we know it's read. */
mark_exp_read (expr);
+ /* Give the conversion call the location of EXPR rather than the
+ location of the context that caused the conversion. */
+ iloc_sentinel ils (loc);
+
/* Pass LOOKUP_NO_CONVERSION so rvalue/base handling knows not to allow
any more UDCs. */
expr = build_over_call (cand, LOOKUP_NORMAL|LOOKUP_NO_CONVERSION,
@@ -90,7 +90,7 @@ bar ()
return false;
}
- S<N> e = __LINE__;
+ S<N> e (__LINE__);
// ^ column 8
S<N> f = 1.0;
if (cmp (e.loc.file_name (), file1))