aboutsummaryrefslogtreecommitdiff
path: root/libdecnumber/decBasic.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2008-10-27 18:25:21 +0000
committerDJ Delorie <dj@redhat.com>2008-10-27 18:25:21 +0000
commitaed1add31bf14e0cf760f01ac02437988b5762c3 (patch)
treeaed74a60e958fae99dbc27b9032af421751ce3ff /libdecnumber/decBasic.c
parente8ecdb5c3b219e270f6f3589129d49598e118fc5 (diff)
downloadgdb-aed1add31bf14e0cf760f01ac02437988b5762c3.zip
gdb-aed1add31bf14e0cf760f01ac02437988b5762c3.tar.gz
gdb-aed1add31bf14e0cf760f01ac02437988b5762c3.tar.bz2
merge from gcc
Diffstat (limited to 'libdecnumber/decBasic.c')
-rw-r--r--libdecnumber/decBasic.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libdecnumber/decBasic.c b/libdecnumber/decBasic.c
index 9ce277d..fddba97 100644
--- a/libdecnumber/decBasic.c
+++ b/libdecnumber/decBasic.c
@@ -1660,8 +1660,10 @@ decFloat * decFloatCompareTotal(decFloat *result,
/* decode the coefficients */
/* (shift both right two if Quad to make a multiple of four) */
#if QUAD
- USHORTAT(bufl)=0;
- USHORTAT(bufr)=0;
+ ub = bufl; /* avoid type-pun violation */
+ USHORTAT(ub)=0;
+ uc = bufr; /* avoid type-pun violation */
+ USHORTAT(uc)=0;
#endif
GETCOEFF(dfl, bufl+QUAD*2); /* decode from decFloat */
GETCOEFF(dfr, bufr+QUAD*2); /* .. */
@@ -3542,8 +3544,10 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
/* decode the coefficients */
/* (shift both right two if Quad to make a multiple of four) */
#if QUAD
- UINTAT(bufl)=0;
- UINTAT(bufr)=0;
+ ub=bufl; /* avoid type-pun violation */
+ UINTAT(ub)=0;
+ uc=bufr; /* avoid type-pun violation */
+ UINTAT(uc)=0;
#endif
GETCOEFF(dfl, bufl+QUAD*2); /* decode from decFloat */
GETCOEFF(dfr, bufr+QUAD*2); /* .. */