How to get printf style compile-time warnings or errors

后端 未结 5 1685
小蘑菇
小蘑菇 2020-12-14 10:39

I would like to write a routine like printf, not functionally-wise, but rather I\'d like the routine to have the same time compile check characteristics as printf.

F

5条回答
  •  一向
    一向 (楼主)
    2020-12-14 11:39

    This behavior is highly compiler dependent. I believe that gcc provides an interface for type checking variadic functions.

提交回复
热议问题