OSDN Git Service

Jakub Jelinek <jj@ultra.linux.cz>
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Aug 1999 23:23:45 +0000 (23:23 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Aug 1999 23:23:45 +0000 (23:23 +0000)
        * 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

gcc/ChangeLog
gcc/real.c

index 6985734..7ec5204 100644 (file)
@@ -1,5 +1,9 @@
 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
 
+       * real.c (PUT_REAL): Clear unused bytes if long double is IEEE quad.
+
+1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
+
        * c-decl.c (get_parm_info, store_parm_decls): Change all uses of
        PROMOTE_PROTOTYPES, so that it tests it as a C expression.
        Ensure expr.h is included.
index 2d61575..a077213 100644 (file)
@@ -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