ia64intrin.h: Add intermediate cast to void * to avoid aliasing warning.
authorAndreas Schwab <schwab@suse.de>
Thu, 22 Apr 2004 22:16:11 +0000 (22:16 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Thu, 22 Apr 2004 22:16:11 +0000 (22:16 +0000)
* config/ia64/ia64intrin.h: Add intermediate cast to void * to
avoid aliasing warning.

From-SVN: r81059

gcc/ChangeLog
gcc/config/ia64/ia64intrin.h

index b13dc2352316067ba7916f3ffaaf4efb3dc5ad48..2a805a2fdba874160ce07f2c4de0c9366e8604b3 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-23  Andreas Schwab  <schwab@suse.de>
+
+       * config/ia64/ia64intrin.h: Add intermediate cast to void * to
+       avoid aliasing warning.
+
 2004-04-22  Jan Hubicka  <jh@suse.cz>
 
       * cfgloopmanip.c (scale_bbs_frequencies): Use RDIV macro
index 262dc20e4d07dc389b2b795b4095d93b4581b1ea..2397c4ccde84fe0810d3686aeb634e7ae7026ad2 100644 (file)
@@ -14,114 +14,114 @@ extern long __sync_val_compare_and_swap_di (long *, long, long);
 #define __sync_val_compare_and_swap(PTR, OLD, NEW)                     \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
   ? (__typeof__(*(PTR)))                                               \
-    __sync_val_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW)) \
+    __sync_val_compare_and_swap_si((int *)(void *)(PTR),(int)(OLD),(int)(NEW)) \
   : (__typeof__(*(PTR)))                                               \
-    __sync_val_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
+    __sync_val_compare_and_swap_di((long *)(void *)(PTR),(long)(OLD),(long)(NEW)))
 
 extern int __sync_bool_compare_and_swap_si (int *, int, int);
 extern int __sync_bool_compare_and_swap_di (long *, long, long);
 #define __sync_bool_compare_and_swap(PTR, OLD, NEW)                    \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? __sync_bool_compare_and_swap_si((int *)(PTR),(int)(OLD),(int)(NEW))        \
-  : __sync_bool_compare_and_swap_di((long *)(PTR),(long)(OLD),(long)(NEW)))
+  ? __sync_bool_compare_and_swap_si((int *)(void *)(PTR),(int)(OLD),(int)(NEW))        \
+  : __sync_bool_compare_and_swap_di((long *)(void *)(PTR),(long)(OLD),(long)(NEW)))
 
 extern void __sync_lock_release_si (int *);
 extern void __sync_lock_release_di (long *);
 #define __sync_lock_release(PTR)               \
   ((sizeof (*(PTR)) == sizeof(int))            \
-   ? __sync_lock_release_si((int *)(PTR))      \
-   : __sync_lock_release_di((long *)(PTR)))
+   ? __sync_lock_release_si((int *)(void *)(PTR))      \
+   : __sync_lock_release_di((long *)(void *)(PTR)))
 
 extern int __sync_lock_test_and_set_si (int *, int);
 extern long __sync_lock_test_and_set_di (long *, long);
 #define __sync_lock_test_and_set(PTR,VAL)                              \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_lock_test_and_set_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_lock_test_and_set_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_fetch_and_add_si (int *, int);
 extern long __sync_fetch_and_add_di (long *, long);
 #define __sync_fetch_and_add(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_fetch_and_add_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_fetch_and_add_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_fetch_and_sub_si (int *, int);
 extern long __sync_fetch_and_sub_di (long *, long);
 #define __sync_fetch_and_sub(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_fetch_and_sub_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_fetch_and_sub_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_fetch_and_and_si (int *, int);
 extern long __sync_fetch_and_and_di (long *, long);
 #define __sync_fetch_and_and(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_fetch_and_and_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_fetch_and_and_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_fetch_and_or_si (int *, int);
 extern long __sync_fetch_and_or_di (long *, long);
 #define __sync_fetch_and_or(PTR,VAL)                                   \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_fetch_and_or_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_fetch_and_or_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_fetch_and_xor_si (int *, int);
 extern long __sync_fetch_and_xor_di (long *, long);
 #define __sync_fetch_and_xor(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_fetch_and_xor_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_fetch_and_xor_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_fetch_and_nand_si (int *, int);
 extern long __sync_fetch_and_nand_di (long *, long);
 #define __sync_fetch_and_nand(PTR,VAL)                                 \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_fetch_and_nand_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_fetch_and_nand_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_add_and_fetch_si (int *, int);
 extern long __sync_add_and_fetch_di (long *, long);
 #define __sync_add_and_fetch(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_add_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_add_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_sub_and_fetch_si (int *, int);
 extern long __sync_sub_and_fetch_di (long *, long);
 #define __sync_sub_and_fetch(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_sub_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_sub_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_and_and_fetch_si (int *, int);
 extern long __sync_and_and_fetch_di (long *, long);
 #define __sync_and_and_fetch(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_and_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_and_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_or_and_fetch_si (int *, int);
 extern long __sync_or_and_fetch_di (long *, long);
 #define __sync_or_and_fetch(PTR,VAL)                                   \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_or_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_or_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_xor_and_fetch_si (int *, int);
 extern long __sync_xor_and_fetch_di (long *, long);
 #define __sync_xor_and_fetch(PTR,VAL)                                  \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_xor_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_xor_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
 
 extern int __sync_nand_and_fetch_si (int *, int);
 extern long __sync_nand_and_fetch_di (long *, long);
 #define __sync_nand_and_fetch(PTR,VAL)                                 \
  ((sizeof (*(PTR)) == sizeof(int))                                     \
-  ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(PTR),(int)(VAL)) \
-  : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(PTR),(long)(VAL)))
+  ? (__typeof__(*(PTR))) __sync_nand_and_fetch_si((int *)(void *)(PTR),(int)(VAL)) \
+  : (__typeof__(*(PTR))) __sync_nand_and_fetch_di((long *)(void *)(PTR),(long)(VAL)))
 
 #ifdef __cplusplus
 }