re PR c++/92869 (C++17 wrongly reports aggregate type as not-aggregate (when explicit...
authorJakub Jelinek <jakub@redhat.com>
Wed, 11 Dec 2019 18:44:02 +0000 (19:44 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 11 Dec 2019 18:44:02 +0000 (19:44 +0100)
commit3455115379cef3a84ce8154b6c4316ed7585f73f
tree5b7319588d18fd1066a4ea5b9d073dccdce3f506
parentc20f7e9971d35b89f17ee6a1bc8ab2462288adda
re PR c++/92869 (C++17 wrongly reports aggregate type as not-aggregate (when explicitly defaulted ctors are added))

PR c++/92869
* class.c (finish_struct): For C++17 and earlier, check
type_has_user_provided_or_explicit_constructor rather than
TYPE_HAS_USER_CONSTRUCTOR whether to set CLASSTYPE_NON_AGGREGATE.

* g++.dg/cpp0x/aggr3.C: New test.

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