This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61660] New: static_assert triggering when it should not


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]