Portability of #warning preprocessor directive

前端 未结 6 1659
孤独总比滥情好
孤独总比滥情好 2020-11-29 10:47

I know that the #warning directive is not standard C/C++, but several compilers support it, including gcc/g++. But for those that don\'t support it, will t

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 11:22

    Actually most compilers that I know about ignore unknown #pragma directives, and output a warning message - so in the worst case, you'll still get a warning.

提交回复
热议问题