CWG 2096 - constraints on literal unions.
authorMarek Polacek <polacek@redhat.com>
Wed, 15 May 2019 20:42:52 +0000 (20:42 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 15 May 2019 20:42:52 +0000 (20:42 +0000)
commit47805f5712322379e683028df4f9a0b0366075a9
tree6628e2308268901e75cec16201608f6f252a44a1
parent193f241906489ee3154a69054c0e2e60e0d7d35b
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.

* g++.dg/cpp0x/literal-type1.C: New test.

From-SVN: r271267
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/literal-type1.C [new file with mode: 0644]