Message ID | 1510350329-48956-7-git-send-email-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show |
Series | Preserving locations for variable-uses and constants (PR 43486) | expand |
On 11/10/2017 04:45 PM, David Malcolm wrote: > gcc/c-family/ChangeLog: > * c-warn.c (sizeof_pointer_memaccess_warning): Strip any location > wrappers from src and dest. Here the existing calls to tree_strip_nop_conversions ought to handle the wrappers. Jason
diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index 09ef685..245c37d 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -770,6 +770,11 @@ sizeof_pointer_memaccess_warning (location_t *sizeof_arg_loc, tree callee, if (idx >= 3) return; + if (src) + STRIP_ANY_LOCATION_WRAPPER (src); + if (dest) + STRIP_ANY_LOCATION_WRAPPER (dest); + if (sizeof_arg[idx] == NULL || sizeof_arg[idx] == error_mark_node) return;