Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Paul N. Hilfinger
Tue, 08 Sep 1992 07:46
Possible stdarg.h bug on Mips Ultrix?
Author: Paul N. Hilfinger
Date: Tue, 08 Sep 1992 07:46
Date: Tue, 08 Sep 1992 07:46
25 lines
1253 bytes
1253 bytes
In gcc 2.2.2, stdarg.h includes va-mips.h, which says
#define va_arg(AP, mode) \
((mode *)(AP = (char *) (__alignof(mode) > 4 \
? ((int)AP + 2*8 - 1) & -8 \
: ((int)AP + 2*4 - 1) & -4)))[-1]
(if !lint). However, under Ultrix V4.2A (Rev. 47) running on a
DecStation, I find the following:
#ifdef __host_mips
...
/* va_arg aligns list and points past data */
#define va_arg(list, mode) ((mode *)(list =\
(va_list) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\
(__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1]
Notice that the va-mips.h code is insensitive to sizeof(mode). As a
result, passing of sufficiently large structures does not work. What
is going on?
P. Hilfinger
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads