This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute
- From: "npl at chello dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 May 2015 12:33:39 +0000
- Subject: [Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66216
Bug ID: 66216
Summary: Defaulted Operators and contructors not working with
aligned attribute
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: npl at chello dot at
Target Milestone: ---
The code below will not compile, faulting with defaulted declaration 'xx' does
not match expected signature.
This behaviour is in any gcc version from 4.7 - 5
// g++ -std=c++11 -c testalign.cpp
class CMymy
{
unsigned char _a;
unsigned char _b;
public:
constexpr CMymy() : _a(), _b() {}
constexpr CMymy(const CMymy &) = default;
CMymy &operator=(const CMymy &) = default;
} __attribute__((aligned(2)));