[Bug c++/78280] New: GCC incorrectly accepts assignment in bitfield width

miyuki at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 9 18:57:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78280

            Bug ID: 78280
           Summary: GCC incorrectly accepts assignment in bitfield width
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: miyuki at gcc dot gnu.org
  Target Milestone: ---

This bug has been recently discovered by Chandler Carruth. GCC incorrectly
accepts the following code:

struct S {
    constexpr int operator=(int) const { return 1; }
};
constexpr S x;
struct S1 {
    int f : x = 3;
};


More information about the Gcc-bugs mailing list