开发者

Emitting warnings on GCC

开发者 https://www.devze.com 2023-02-23 00:54 出处:网络
Is there a way that I could pass a string message 开发者_Python百科as a warnign in GCC (but not as an ordinary message)?(googled:)

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

精彩评论

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