[Bug c++/66216] New: Defaulted Operators and contructors not working with aligned attribute
npl at chello dot at
gcc-bugzilla@gcc.gnu.org
Wed May 20 12:33:00 GMT 2015
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)));
More information about the Gcc-bugs
mailing list