On 5/13/19 6:07 PM, Marek Polacek wrote:
This patch implements CWG 2096 which relaxes the constraints for literal unions.

[basic.types]/p10 now says: A type is a literal type if...
-- it is a union, at least one of its non-static data members is of 
non-volatile literal type,
[...]

check_field_decls is called with CLASSTYPE_LITERAL_P set to true, so we can
re-set it after we've processed all fields.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2019-05-13  Marek Polacek  <pola...@redhat.com>

        CWG 2096 - constraints on literal unions.
        * class.c (check_field_decls): Initialize booleans directly.  A union
        is literal if at least one of its non-static data members is of
        non-volatile literal type.

OK, thanks.

Jason

Reply via email to