简体   繁体   中英

“#warning” not always being shown in the Error List

I use this to mark code I need to come back to:

#warning Do more stuff here

However, sometimes these warning don't show up in the Error List window after a build. I can see the warnings in the compiler output window, but only some of them make it into the Error List. If I have the code file open that has these warnings they are always shown. If I have the code file closed, they don't appear most of the time. Is there a setting I can change to adjust this behaviour and always show the warnings in the Error List?

The reason is that, even if a warning occurs, the compiler normally considers this source file to be ok. So in an incremental build, the source file isn't recompiled, and the warning isn't displayed.

如果您进行重建,它们应该出现

在项目属性的“构建”选项卡中,选择“将警告视为错误->全部”单选按钮。

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