Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

stdarg.h in C

Name: Anonymous 2012-09-05 16:00

I'm currently writing a C standard library for academic purposes, and I wondered how to implement stdarg.h (the va_* macros) in C (probably with inline ASM) and if this was the libc's work, or the compiler's ?
Thanks in advance.

Name: Anonymous 2012-09-07 4:13

Variadic functions complicate type checking and optimisation. Abandon and replace them with more efficient meta-programming-based techniques.
For instance, you can have a preprocessor turn printf("%02x: %s\n", i, strings[i]); into print_hex(2, i); print_string(": "); print_string(strings[i]);.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List