Idiom exclusion is really so important
Idiom exclusion is really so important
Posted Nov 13, 2024 9:31 UTC (Wed) by pm215 (subscriber, #98099)In reply to: Idiom exclusion is really so important by error27
Parent article: Progress on toolchain security features
Coverity has a particularly irritating version of that "unsigned comparison with zero in a bounds check" warning, where it will do so when the type being bounds checked is an enum. Unless I have got confused (not unlikely where C standard minutiae are concerned :-)) enums with no negative values may be signed or unsigned as the compiler chooses, so for portability the greater-than-or-equal-to-zero check is necessary, but Coverity gripes about it because the implementation happens to have used an unsigned type for the enum...
