gcc/c-family/ChangeLog:
        * c-warn.c (sizeof_pointer_memaccess_warning): Strip any location
        wrappers from src and dest.
---
 gcc/c-family/c-warn.c | 5 +++++
 1 file changed, 5 insertions(+)

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;
 
-- 
1.8.5.3

Reply via email to