How to implement stdarg in C

前端 未结 4 1323
無奈伤痛
無奈伤痛 2020-12-21 00:43

For curiosity, I\'m looking to write minimal replacements for some of the functions in the standard C library. So far, I have finished printf(), strlen()<

4条回答
  •  一向
    一向 (楼主)
    2020-12-21 01:30

    You can see examples of how to implement the va macros here. This header is used in VC++ and there are different implementations for each processor architecture. The macros don't seem to be specific to the Microsoft compiler. In both GCC and Clang the va macros refer to compiler built-in functions.

提交回复
热议问题