https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93241
Bug ID: 93241 Summary: _Bool casts in dead branches of integer constant expressions cause undesirable warnings under -pedantic iff the dead branch contains overflow Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pskocik at gmail dot com Target Milestone: --- About the simplest example of this I could get: //erroneously warns about non-constness under -pedantic _Static_assert( 0? (_Bool)(INT_MAX+1) : 1 ,""); https://gcc.godbolt.org/z/W_tvTS The problem seems to have existed since gcc 5.