Commit 92c874f7 by Richard Kenner

(va_arg): Don't assume __va_rounded_size (char) has the value of 4.

From-SVN: r9550
parent 303a5e00
......@@ -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 */
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment