This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 52487


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]