diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-09-15 05:08:02 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-09-15 05:08:02 +0000 |
commit | c41afb4032a9386e5d5a04d0c1d66f16a0862869 (patch) | |
tree | c311824632a76447650144710d097e05f5a0c2a8 /gcc/ginclude/stdarg.h | |
parent | 86ff3166cd2a7cfdcf491c97e71c8b2a9969e031 (diff) | |
download | gcc-c41afb4032a9386e5d5a04d0c1d66f16a0862869.tar.gz |
(va_arg): Cast ptr to void *, then to TYPE *.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2124 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ginclude/stdarg.h')
-rw-r--r-- | gcc/ginclude/stdarg.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h index 79fe404d5ea..ee9204ab4e9 100644 --- a/gcc/ginclude/stdarg.h +++ b/gcc/ginclude/stdarg.h @@ -62,9 +62,11 @@ typedef void *__gnuc_va_list; void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #define va_end(AP) +/* We cast to void * and then to TYPE * because this avoids + a warning about increasing the alignment requirement. */ #define va_arg(AP, TYPE) \ (AP = (char *) (AP) + __va_rounded_size (TYPE), \ - *((TYPE *) ((char *) (AP) - __va_rounded_size (TYPE)))) + *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) #endif /* _STDARG_H */ #endif /* not alpha */ |