From: Oleg Tolmatcev <[email protected]>

Match Clang's declaration of _m_prefetchw to avoid requiring
const_cast<void *> at call sites.

gcc/
    * config/i386/prfchwintrin.h (_m_prefetchw): Take
    volatile const void * instead of void *.

Signed-off-by: oltolm <[email protected]>
---
 gcc/config/i386/prfchwintrin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/i386/prfchwintrin.h b/gcc/config/i386/prfchwintrin.h
index af3bded18e..2ac190964d 100644
--- a/gcc/config/i386/prfchwintrin.h
+++ b/gcc/config/i386/prfchwintrin.h
@@ -29,9 +29,9 @@
 #define _PRFCHWINTRIN_H_INCLUDED
 
 extern __inline void __attribute__((__gnu_inline__, __always_inline__, 
__artificial__))
-_m_prefetchw (void *__P)
+_m_prefetchw (volatile const void *__P)
 {
-  __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
+  __builtin_prefetch ((const void *) __P, 1, 3 /* _MM_HINT_T0 */);
 }
 
 #endif /* _PRFCHWINTRIN_H_INCLUDED */
-- 
2.54.0.windows.1

Reply via email to