This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78280] New: GCC incorrectly accepts assignment in bitfield width
- From: "miyuki at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Nov 2016 18:56:47 +0000
- Subject: [Bug c++/78280] New: GCC incorrectly accepts assignment in bitfield width
- Auto-submitted: auto-generated
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;
};