https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94923
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Sebor <mse...@gcc.gnu.org>: https://gcc.gnu.org/g:c0d8623ce5aa6d92c2e6c62e1bee66272a011f59 commit r11-499-gc0d8623ce5aa6d92c2e6c62e1bee66272a011f59 Author: Martin Sebor <mse...@redhat.com> Date: Tue May 19 12:46:37 2020 -0600 PR c++/94923 - False positive -Wclass-memaccess with trivially copyable std::optional gcc/cp/ChangeLog: PR c++/94923 * call.c ((maybe_warn_class_memaccess): Use is_byte_access_type. * cp-tree.h (is_dummy_object): Return bool. (is_byte_access_type): Declare new function. * tree.c (is_dummy_object): Return bool. (is_byte_access_type): Define new function. gcc/testsuite/ChangeLog: PR c++/94923 * g++.dg/Wclass-memaccess.C: Add tests for std::byte.