This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 52487
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Mar 2012 21:13:58 +0100
- Subject: Re: [C++ Patch] PR 52487
- References: <4F689E3A.20805@oracle.com> <4F68D900.2000604@redhat.com>
On 03/20/2012 08:22 PM, Jason Merrill wrote:
That assert is there to make sure that we don't try to test for
literality of an incomplete type. We should check for completeness
before trying to check for literality.
You mean, in the relevant caller, here in check_field_decls:
/* If at least one non-static data member is non-literal, the whole
class becomes non-literal. */
if (!literal_type_p (type))
CLASSTYPE_LITERAL_P (t) = false;
essentially setting CLASSTYPE_LITERAL_P (t) = false; also when
CLASS_TYPE_P (type) && !COMPLETE_TYPE_P (complete_type (type) or maybe
just CLASS_TYPE_P (type) && !COMPLETE_TYPE_P (type) ?
Thanks,
Paolo.