Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Marc Bassini
Fri, 09 Oct 1992 20:42
gcc bug
Author: Marc Bassini
Date: Fri, 09 Oct 1992 20:42
Date: Fri, 09 Oct 1992 20:42
44 lines
1605 bytes
1605 bytes
VERSION:2.2.2
INPUT: #include <stdarg.h>
foo(char *const bar, ...)
{
va_list ap;
va_start(ap, bar);
char *tmp;
while ((tmp = va_arg(ap, char *const)) != (char *const) NULL)
{}
va_end(ap);
}
The following macro is extracted from:
gcc-lib/sparc-sun-sunos4.1/2.2.2/include/va-sparc.h:
#define va_arg(pvar,TYPE) \
__extension__ \
({ TYPE __va_temp; \
((__builtin_classify_type (__va_temp) >= 12) \
? ((pvar) += __va_rounded_size (TYPE *), \
**(TYPE **) ((pvar) - __va_rounded_size (TYPE *))) \
: __va_rounded_size (TYPE) == 8 \
? ({ union {TYPE d; int i[2];} u; \
u.i[0] = ((int *) (pvar))[0]; \
u.i[1] = ((int *) (pvar))[1]; \
(pvar) += 8; \
u.d; }) \
: ((pvar) += __va_rounded_size (TYPE), \
*((TYPE *) ((pvar) - __va_rounded_size (TYPE)))));})
ARGUMENTS: -g -c
MACHINE: sparc elc running SunOS Release 4.1.1
OPERANDS: sparc-sun-sunos4.1
INPUT doesn't work because when TYPE is const, __va_temp needs
initialization.
Marc Bassini (marc@ccv.fr, marc@cnam.cnam.fr)
Computers, Communications & Visions (C2V)
82 bd Haussmann, 75008 Paris FRANCE
Phone 40.08.07.07, Fax 43.87.35.99
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