(va_arg): Don't assume __va_rounded_size (char) has the value of 4.
From-SVN: r9550
This commit is contained in:
parent
303a5e0005
commit
92c874f7d7
2 changed files with 6 additions and 6 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue