FreeBSD/contrib/gcc/cp/class.c
/* Check the validity of the bases and members declared in T.  Add any
   implicitly-generated functions (like copy-constructors and
   assignment operators).  Compute various flag bits (like
   CLASSTYPE_NON_POD_T) for T.  This routine works purely at the C++
   level: i.e., independently of the ABI in use.  */
Check the validity of the bases and members declared in T.  Add any
implicitly-generated functions (like copy-constructors and
assignment operators).  Compute various flag bits (like
CLASSTYPE_NON_POD_T) for T.  This routine works purely at the C
level: i.e., independently of the ABI in use.
Check the validity of the bases and members declared in T . Add any implicitly - generated functions ( like copy - constructors and assignment operators ) . Compute various flag bits ( like CLASSTYPE_NON_POD_T ) for T . This routine works purely at the C level : i . e . independently of the ABI in use .
static void
check_bases_and_members (tree t)
{
  int cant_have_const_ctor;
  int no_const_asn_ref;
  tree access_decls;
  cant_have_const_ctor = 0;
  no_const_asn_ref = 0;
  check_bases (t, &cant_have_const_ctor,
	       &no_const_asn_ref);
  check_methods (t);
  check_field_decls (t, &access_decls,
		     &cant_have_const_ctor,
		     &no_const_asn_ref);
  if (!TYPE_CONTAINS_VPTR_P (t))
    CLASSTYPE_NEARLY_EMPTY_P (t) = 0;
  TYPE_HAS_COMPLEX_INIT_REF (t)
    |= (TYPE_HAS_INIT_REF (t) || TYPE_CONTAINS_VPTR_P (t));
  TYPE_NEEDS_CONSTRUCTING (t)
    |= (TYPE_HAS_CONSTRUCTOR (t) || TYPE_CONTAINS_VPTR_P (t));
  CLASSTYPE_NON_AGGREGATE (t)
    |= (TYPE_HAS_CONSTRUCTOR (t) || TYPE_POLYMORPHIC_P (t));
  CLASSTYPE_NON_POD_P (t)
    |= (CLASSTYPE_NON_AGGREGATE (t)
	|| TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
	|| TYPE_HAS_ASSIGN_REF (t));
  TYPE_HAS_COMPLEX_ASSIGN_REF (t)
    |= TYPE_HAS_ASSIGN_REF (t) || TYPE_CONTAINS_VPTR_P (t);
  add_implicitly_declared_members (t,
				   cant_have_const_ctor,
				   no_const_asn_ref);
  clone_constructors_and_destructors (t);
  for (; access_decls; access_decls = TREE_CHAIN (access_decls))
    handle_using_decl (TREE_VALUE (access_decls), t);
  finish_struct_methods (t);
  TYPE_LANG_SPECIFIC (t)->u.c.vec_new_uses_cookie
    = type_requires_array_cookie (t);
}
static void check_bases_and_members ( tree t ) { int cant_have_const_ctor ; int no_const_asn_ref ; tree access_decls ; cant_have_const_ctor = 0 ; no_const_asn_ref = 0 ; check_bases ( t , & cant_have_const_ctor , & no_const_asn_ref ) ; check_methods ( t ) ; check_field_decls ( t , & access_decls , & cant_have_const_ctor , & no_const_asn_ref ) ; if ( ! TYPE_CONTAINS_VPTR_P ( t ) ) CLASSTYPE_NEARLY_EMPTY_P ( t ) = 0 ; TYPE_HAS_COMPLEX_INIT_REF ( t ) |= ( TYPE_HAS_INIT_REF ( t ) || TYPE_CONTAINS_VPTR_P ( t ) ) ; TYPE_NEEDS_CONSTRUCTING ( t ) |= ( TYPE_HAS_CONSTRUCTOR ( t ) || TYPE_CONTAINS_VPTR_P ( t ) ) ; CLASSTYPE_NON_AGGREGATE ( t ) |= ( TYPE_HAS_CONSTRUCTOR ( t ) || TYPE_POLYMORPHIC_P ( t ) ) ; CLASSTYPE_NON_POD_P ( t ) |= ( CLASSTYPE_NON_AGGREGATE ( t ) || TYPE_HAS_NONTRIVIAL_DESTRUCTOR ( t ) || TYPE_HAS_ASSIGN_REF ( t ) ) ; TYPE_HAS_COMPLEX_ASSIGN_REF ( t ) |= TYPE_HAS_ASSIGN_REF ( t ) || TYPE_CONTAINS_VPTR_P ( t ) ; add_implicitly_declared_members ( t , cant_have_const_ctor , no_const_asn_ref ) ; clone_constructors_and_destructors ( t ) ; for ( ; access_decls ; access_decls = TREE_CHAIN ( access_decls ) ) handle_using_decl ( TREE_VALUE ( access_decls ) , t ) ; finish_struct_methods ( t ) ; TYPE_LANG_SPECIFIC ( t ) -> u . c . vec_new_uses_cookie = type_requires_array_cookie ( t ) ; }
Check the validity of the bases and members declared in T.  Add any
implicitly-generated functions (like copy-constructors and
assignment operators).
Check the validity of the bases and members declared in T . Add any implicitly - generated functions ( like copy - constructors and assignment operators ) .
/* Nonzero if the implicitly generated copy constructor should take
     a non-const reference argument.  */ /* Nonzero if the implicitly generated assignment operator
     should take a non-const reference argument.  */ /* By default, we use const reference arguments and generate default
     constructors.  */ /* Check all the base-classes.  */ /* Check all the method declarations.  */ /* Check all the data member declarations.  We cannot call
     check_field_decls until we have called check_bases check_methods,
     as check_field_decls depends on TYPE_HAS_NONTRIVIAL_DESTRUCTOR
     being set appropriately.  */ /* A nearly-empty class has to be vptr-containing; a nearly empty
     class contains just a vptr.  */ /* Do some bookkeeping that will guide the generation of implicitly
     declared member functions.  */ /* Synthesize any needed methods.  */ /* Create the in-charge and not-in-charge variants of constructors
     and destructors.  */ /* Process the using-declarations.  */ /* Build and sort the CLASSTYPE_METHOD_VEC.  */ /* Figure out whether or not we will need a cookie when dynamically
     allocating an array of this type.  */