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++/78280] New: GCC incorrectly accepts assignment in bitfield width


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;
};

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