On Mon, Apr 27, 2020 at 03:32:29PM -0400, Jason Merrill wrote: > Note that C++20 adds empty non-static data members with the > [[no_unique_address]] attribute. How will that fit into these ABIs and the > others that had issues with parameter passing?
Are they also represented in the trees handed over to the middle-end as FIELD_DECLs with bitsize_zero DECL_SIZE and TREE_TYPE that contains padding (like the empty base field does)? Or are they just like say C empty structs in other structs (bitsize_zero DECL_SIZE and TYPE_SIZE of TREE_TYPE)? I bet they aren't DECL_ARTIFICIAL, but should have the no_unique_address attribute on them, so the backends or some helper function in calls.c could again catch them and decide what to do. I guess at least we don't have an ABI incompatibility between different -std=* versions, and given that it seems clang++ also implements it, it will be worth checking the passing against it. Jakub