[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
must use gcc builtin?
#define _BSD_VA_LIST_ __builtin_va_list /* GCC built-in type */
#define _BSD_VA_LIST_ char * /* XXXfvdl should be ok? */
How to avoid using gcc's builtin va_list when compiling with gcc?
Just for fun, I thought I'd try compiling Gary Capell's "wily"
editor. The code is from 2006, hardly ancient. Its library manipulates
a va_list as pointer using assignment and subtraction. AFAICT the
above code makes that impossible. The compiler certainly doesn't like
return ap - (va_list)o;
../../libplan9c/doprint.c:369: error: cast specifies array type
I can't #undef __GNUC__. Do we really want to require the use of
builtins? I'd like a knob to compile idiomatic C, especially
*good* idiomatic C.
does not define a type for va_list. Assuming it's a pointer might be
nonportable, but it's not prohibited by the standard.
(BTW, why is this code in the machine directory? I don't see any
Main Index |
Thread Index |