Add my own compiler warning

前端 未结 5 1428
庸人自扰
庸人自扰 2021-01-03 19:20

When using sprintf, the compiler warns me that the function is deprecated.

How can I show my own compiler warning?

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-03 19:46

    I think this should work

    void foo () __attribute__ ((deprecated("This function is deprecated. \nFor further information please refer to the README")));
    

提交回复
热议问题