CWG 2094 - volatile scalars are trivially copyable.
authorMarek Polacek <polacek@redhat.com>
Mon, 20 May 2019 19:10:57 +0000 (19:10 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 20 May 2019 19:10:57 +0000 (19:10 +0000)
commitbe9e458d8bed984fe13bd7a6daf76bb34ef3ed7f
tree79965ad0b9b9ae9d443f1d8e5c49d9dd87b6bfaa
parentf12ea6acdeb3b62ddb8324bc71a67c6a189f6c3c
CWG 2094 - volatile scalars are trivially copyable.

PR c++/85679
* tree.c (trivially_copyable_p): Don't check CP_TYPE_VOLATILE_P for
scalar types.

* g++.dg/ext/is_trivially_constructible1.C: Change the expected result
for volatile int.
* g++.dg/ext/is_trivially_copyable.C: New test.

* testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
result for volatile int.

From-SVN: r271435
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/is_trivially_constructible1.C
gcc/testsuite/g++.dg/ext/is_trivially_copyable.C [new file with mode: 0644]
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/is_trivially_copyable/value.cc