开发者

How to ignore 'comparison between signed and unsigned integer expressions'?

开发者 https://www.devze.com 2023-01-29 21:02 出处:网络
Can anybody please tell me which flag I have to use in order to make gcc ignore the \'compar开发者_Go百科ison between signed and unsigned integer expressions\' warning message.gcc -Wno-sign-compare

Can anybody please tell me which flag I have to use in order to make gcc ignore the 'compar开发者_Go百科ison between signed and unsigned integer expressions' warning message.


gcc -Wno-sign-compare

But you should really fix the comparison it's warning you about anyway.


Here's what worked for me, using the gcc compiler in Code::Blocks. In the compiler settings, click the "Compiler Settings" tab, then choose "Other Compiler Options. Type in -Wno-sign-compare The warning -Wsign-compare can be negated by adding "-Wno" as a prefix. In fact warnings can be ignored by adding -Wno- to the warning code.

0

精彩评论

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