OSDN Git Service

(va_arg): Don't assume __va_rounded_size (char) has the value of 4.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Apr 1995 12:11:09 +0000 (12:11 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Apr 1995 12:11:09 +0000 (12:11 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9550 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ginclude/stdarg.h
gcc/ginclude/varargs.h

index 0ac176e..b8d85e8 100644 (file)
@@ -84,9 +84,9 @@ void va_end (__gnuc_va_list);         /* Defined in libgcc.a */
 /* This is for big-endian machines; small args are padded downward.  */
 #define va_arg(AP, TYPE)                                               \
  (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)),    \
-  *((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4             \
-                                        ? sizeof (TYPE)                \
-                                        : __va_rounded_size (TYPE))))))
+  *((TYPE *) (void *) ((char *) (AP)                                   \
+                      - ((sizeof (TYPE) < __va_rounded_size (char)     \
+                          ? sizeof (TYPE) : __va_rounded_size (TYPE))))))
 #endif /* big-endian */
 #endif /* _STDARG_H */
 
index 68e20a6..1709805 100644 (file)
@@ -103,9 +103,9 @@ typedef void *__gnuc_va_list;
 /* This is for big-endian machines; small args are padded downward.  */
 #define va_arg(AP, TYPE)                                               \
  (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)),    \
-  *((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4             \
-                                        ? sizeof (TYPE)                \
-                                        : __va_rounded_size (TYPE))))))
+  *((TYPE *) (void *) ((char *) (AP)                                   \
+                      - ((sizeof (TYPE) < __va_rounded_size (char)     \
+                          ? sizeof (TYPE) : __va_rounded_size (TYPE))))))
 #endif /* big-endian */
 
 #endif /* not h8300 */