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) ?


Reply via email to