https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67980
Bug ID: 67980 Summary: left shift count is negative [-Wshift-count-negative] generated for unreachable code Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nacitar at ubercpp dot com Target Milestone: --- Created attachment 36519 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36519&action=edit test driver With -Wall, unreachable code in a constexpr function generates a warning if written using c++14's expanded constexpr and using actual if statements, however does not in the case of a ternary-styled c++11 constexpr function. This can be worked around using template specializations, but certainly this error shouldn't happen given that these values are all known at compilation time and it's impossible for that count to ever actually be negative. This is a simplification of the problem from a larger issue.