Commit e0ff153d by Jason Merrill Committed by Jason Merrill

re PR c++/66216 (Defaulted Operators and constructors not working with aligned attribute)

	PR c++/66216
	* class.c (finish_struct): Call fixup_attribute_variants.

From-SVN: r225087
parent 9579e906
2015-06-26 Jason Merrill <jason@redhat.com> 2015-06-26 Jason Merrill <jason@redhat.com>
PR c++/66216
* class.c (finish_struct): Call fixup_attribute_variants.
PR c++/66684 PR c++/66684
* typeck2.c (merge_exception_specifiers): Allow different * typeck2.c (merge_exception_specifiers): Allow different
noexcept-specifiers if we've had errors. noexcept-specifiers if we've had errors.
......
...@@ -6820,6 +6820,7 @@ finish_struct (tree t, tree attributes) ...@@ -6820,6 +6820,7 @@ finish_struct (tree t, tree attributes)
unreverse_member_declarations (t); unreverse_member_declarations (t);
cplus_decl_attributes (&t, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE); cplus_decl_attributes (&t, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE);
fixup_attribute_variants (t);
/* Nadger the current location so that diagnostics point to the start of /* Nadger the current location so that diagnostics point to the start of
the struct, not the end. */ the struct, not the end. */
......
// PR c++/66216
// { dg-do compile { target c++11 } }
// { dg-options "" }
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)));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment