diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-06-22 08:20:24 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-06-22 08:20:24 +0000 |
commit | 1fde88f189827bd49d855e85d65906ffd3372275 (patch) | |
tree | 2e847ae2ed7611f3d265782b957a91e5942e418f /gcc/ginclude | |
parent | 2e756f7d344058b58e417e478feb8d8772e0c517 (diff) | |
download | gcc-1fde88f189827bd49d855e85d65906ffd3372275.tar.gz |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1233 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ginclude')
-rw-r--r-- | gcc/ginclude/va-sparc.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ginclude/va-sparc.h b/gcc/ginclude/va-sparc.h index e199e1c0165..2afc3c47ff6 100644 --- a/gcc/ginclude/va-sparc.h +++ b/gcc/ginclude/va-sparc.h @@ -48,6 +48,8 @@ typedef void * __va___list; passed by invisible reference. ??? RECORD_TYPE args passed in the stack are made to be word-aligned; for an aggregate that is not word-aligned, we advance the pointer to the first non-reg slot. */ +/* We don't declare the union member `d' to have type TYPE + because that would lose in C++ if TYPE has a constructor. */ #define va_arg(pvar,TYPE) \ __extension__ \ ({ TYPE __va_temp; \ @@ -55,10 +57,10 @@ __extension__ \ ? ((pvar) += __va_rounded_size (TYPE *), \ **(TYPE **) ((pvar) - __va_rounded_size (TYPE *))) \ : __va_rounded_size (TYPE) == 8 \ - ? ({ union {TYPE d; int i[2];} u; \ - u.i[0] = ((int *) (pvar))[0]; \ - u.i[1] = ((int *) (pvar))[1]; \ + ? ({ union {char __d[sizeof (TYPE)]; int __i[2];} __u; \ + __u.__i[0] = ((int *) (pvar))[0]; \ + __u.__i[1] = ((int *) (pvar))[1]; \ (pvar) += 8; \ - u.d; }) \ + *(TYPE *)__u.__d; }) \ : ((pvar) += __va_rounded_size (TYPE), \ *((TYPE *) ((pvar) - __va_rounded_size (TYPE)))));}) |