empty4.C
1.75 KB
-
Implement P0840, language support for empty objects. · bedf03a2
The [[no_unique_address]] attribute on a non-static data member enables the equivalent of the empty base optimization. gcc/cp/ * tree.c (handle_no_unique_addr_attribute): New. (cxx_attribute_table): Add [[no_unique_address]]. * class.c (field_poverlapping_p): New. (layout_class_type): Check it. Adjust DECL_SIZE of potentially overlapping fields. (layout_empty_base_or_field): Rename from layout_empty_base, handle FIELD_DECL as well. (build_base_field, record_subobject_offsets): Adjust. c-family/ * c-lex.c (c_common_has_attribute): Add no_unique_address. From-SVN: r264813
Jason Merrill committed