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++/66216] New: Defaulted Operators and contructors not working with aligned attribute


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


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