http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51755
Bug #: 51755 Summary: -Wconversion generates false warnings when the ternary operator is used Classification: Unclassified Product: gcc Version: 4.4.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: james.ka...@gmail.com This might be covered by 40752; it's related. But if -Wconversion is used, simple code like the following int main() { static uint8_t const k = 0x02; bool c = true; uint8_t x = 0; x |= c ? k : 0; } triggers a warning, although there is absolutely no possibility of overflow.