开发者

Emitting warnings on GCC

Is there a way that I could pass a string message 开发者_Python百科as a warnign in GCC (but not as an ordinary message)?


(googled:)

#error works and needs to, because the standard mandates it. gcc also has #warning.


You could use warning about usunused variable for this - http://www.ideone.com/GyAMq

if(1 < 0) {
            char warning__1_Should_not_be_less_than_0;
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜