aboutsummaryrefslogtreecommitdiff
path: root/gcc/ginclude
diff options
context:
space:
mode:
authorGavin Koch <gavin@cygnus.com>1998-02-16 06:14:01 +0000
committerGavin Romig-Koch <gavin@gcc.gnu.org>1998-02-16 06:14:01 +0000
commit8898f8a1825584e7b151473ec13c6c2e66220d6e (patch)
treeb1c7937f8f718defaf09befaf03c4ad7425638bf /gcc/ginclude
parent9ba7a303aaec6bc6ccc410df364cf9d0cafa65c0 (diff)
downloadgcc-8898f8a1825584e7b151473ec13c6c2e66220d6e.zip
gcc-8898f8a1825584e7b151473ec13c6c2e66220d6e.tar.gz
gcc-8898f8a1825584e7b151473ec13c6c2e66220d6e.tar.bz2
va-mips.h: Replace casts of pointers to int with casts of pointers to __PTRDIFF_TYPE__.
* ginclude/va-mips.h: Replace casts of pointers to int with casts of pointers to __PTRDIFF_TYPE__. From-SVN: r18025
Diffstat (limited to 'gcc/ginclude')
-rw-r--r--gcc/ginclude/va-mips.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ginclude/va-mips.h b/gcc/ginclude/va-mips.h
index a622199..09063ac 100644
--- a/gcc/ginclude/va-mips.h
+++ b/gcc/ginclude/va-mips.h
@@ -200,7 +200,7 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
#define __va_next_addr(__AP, __type) \
(((__builtin_classify_type (* (__type *) 0) < __record_type_class \
&& __alignof__ (__type) > 4) \
- ? __AP = (char *) (((int) __AP + 8 - 1) & -8) \
+ ? __AP = (char *) (((__PTRDIFF_TYPE__) __AP + 8 - 1) & -8) \
: (char *) 0), \
(__builtin_classify_type (* (__type *) 0) >= __record_type_class \
? (__AP += __va_reg_size) - __va_reg_size \
@@ -240,8 +240,9 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
#ifdef __mips64
#ifdef __MIPSEB__
#define va_arg(__AP, __type) \
- ((__type *) (void *) (__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
- + __va_rounded_size (__type))))[-1]
+ ((__type *) (void *) (__AP = (char *) \
+ ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
+ + __va_rounded_size (__type))))[-1]
#else
#define va_arg(__AP, __type) \
((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
@@ -255,16 +256,16 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
/* For big-endian machines. */
#define va_arg(__AP, __type) \
((__AP = (char *) ((__alignof__ (__type) > 4 \
- ? ((int)__AP + 8 - 1) & -8 \
- : ((int)__AP + 4 - 1) & -4) \
+ ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
+ : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
+ __va_rounded_size (__type))), \
*(__type *) (void *) (__AP - __va_rounded_size (__type)))
#else
/* For little-endian machines. */
#define va_arg(__AP, __type) \
((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \
- ? ((int)__AP + 8 - 1) & -8 \
- : ((int)__AP + 4 - 1) & -4) \
+ ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
+ : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
+ __va_rounded_size(__type))))[-1]
#endif
#endif