https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61660
Bug ID: 61660
Summary: static_assert triggering when it should not
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: us15 at os dot inf.tu-dresden.de
Created attachment 33034
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33034&action=edit
Test case
In the attached test case, for each compile-time constant value x, only one
static_assert in the switch statement should be checked. Looks like all four of
them are checked every time.
Compile with: g++ -std=gnu++11 foo.cc -o foo