This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 06/14] Fix Wsizeof-pointer-memaccess*.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]