summaryrefslogtreecommitdiff
path: root/libdecnumber/decNumberLocal.h
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-27 16:45:40 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-27 16:45:40 +0000
commit67da83cb6a7c3a20581e4a8f424bb89c504e4cd3 (patch)
tree130ea634c2b45eddb3c5bd4abf6babb041bd851a /libdecnumber/decNumberLocal.h
parentdf07a54c3de6c774315ca98463160df1dac5ce60 (diff)
downloadgcc-67da83cb6a7c3a20581e4a8f424bb89c504e4cd3.tar.gz
PR other/37897
* decDouble.h (decDouble): Replace struct with union accessible by more types. * decSingle.h (decSingle): Ditto. * decQuad.h (decQuad): Ditto. * decNumberLocal.h (DFWORD, DFBYTE, DFWWORD): access decFloat via new members. * decBasic.c (decFloatCompareTotal): Avoid type-pun violation. (decNumberCompare): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libdecnumber/decNumberLocal.h')
-rw-r--r--libdecnumber/decNumberLocal.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdecnumber/decNumberLocal.h b/libdecnumber/decNumberLocal.h
index 809eaa466a2..f1568f725e1 100644
--- a/libdecnumber/decNumberLocal.h
+++ b/libdecnumber/decNumberLocal.h
@@ -308,13 +308,13 @@
#define DECWORDS (DECBYTES/4)
#define DECWWORDS (DECWBYTES/4)
#if DECLITEND
- #define DFWORD(df, off) UINTAT((df)->bytes+(DECWORDS-1-(off))*4)
- #define DFBYTE(df, off) UBYTEAT((df)->bytes+(DECBYTES-1-(off)))
- #define DFWWORD(dfw, off) UINTAT((dfw)->bytes+(DECWWORDS-1-(off))*4)
+ #define DFWORD(df, off) ((df)->words[DECWORDS-1-(off)])
+ #define DFBYTE(df, off) ((df)->bytes[DECBYTES-1-(off)])
+ #define DFWWORD(dfw, off) ((dfw)->words[DECWWORDS-1-(off)])
#else
- #define DFWORD(df, off) UINTAT((df)->bytes+(off)*4)
- #define DFBYTE(df, off) UBYTEAT((df)->bytes+(off))
- #define DFWWORD(dfw, off) UINTAT((dfw)->bytes+(off)*4)
+ #define DFWORD(df, off) ((df)->words[off])
+ #define DFBYTE(df, off) ((df)->bytes[off])
+ #define DFWWORD(dfw, off) ((dfw)->words[off])
#endif
/* Tests for sign or specials, directly on DECFLOATs */