简体   繁体   中英

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

任何人都可以告诉我,为了使gcc忽略“有符号和无符号整数表达式之间的比较”警告消息,我必须使用哪个标志。

gcc -Wno-sign-compare

但是你应该真的修正它无论如何警告你的比较。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM