diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-02 23:23:45 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-02 23:23:45 +0000 |
commit | 6bfd5083bbda841256d11ada370b9acff6d72642 (patch) | |
tree | 4fc79ddfa618dc9e993c7284a4d5a74bc48837f3 /gcc/real.c | |
parent | 9dbd91d85ae8e076c89bd3406f6c4fb4d99d92d6 (diff) | |
download | gcc-6bfd5083bbda841256d11ada370b9acff6d72642.tar.gz |
Jakub Jelinek <jj@ultra.linux.cz>
* real.c (PUT_REAL): Clear unused bytes if long double is IEEE quad.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/real.c b/gcc/real.c index 2d615757af1..a077213309c 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -260,7 +260,12 @@ do { \ #define MAXDECEXP 4932 #define MINDECEXP -4977 #define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE) -#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE) +#define PUT_REAL(e,r) \ +do { \ + if (2*NE < sizeof(*r)) \ + bzero((char *)r, sizeof(*r)); \ + bcopy ((char *) e, (char *) r, 2*NE); \ +} while (0) #else #define NE 6 #define MAXDECEXP 4932 |