FreeBSD/contrib/gcc/cp/cp-objcp-common.c
/* Langhook for expr_size: Tell the backend that the value of an expression
   of non-POD class type does not include any tail padding; a derived class
   might have allocated something there.  */
Langhook for expr_size: Tell the backend that the value of an expression
of non-POD class type does not include any tail padding; a derived class
might have allocated something there.
Langhook for expr_size : Tell the backend that the value of an expression of non - POD class type does not include any tail padding ; a derived class might have allocated something there .
tree
cp_expr_size (tree exp)
{
  tree type = TREE_TYPE (exp);
  if (CLASS_TYPE_P (type))
    {
      gcc_assert (!TYPE_HAS_COMPLEX_INIT_REF (type)
		  || !TYPE_HAS_COMPLEX_ASSIGN_REF (type)
		  || TREE_CODE (exp) == CONSTRUCTOR
		  || CP_AGGREGATE_TYPE_P (type));
      return (is_empty_class (type)
	      ? size_zero_node
	      : CLASSTYPE_SIZE_UNIT (type));
    }
  else
    return lhd_expr_size (exp);
}
tree cp_expr_size ( tree exp ) { tree type = TREE_TYPE ( exp ) ; if ( CLASS_TYPE_P ( type ) ) { gcc_assert ( ! TYPE_HAS_COMPLEX_INIT_REF ( type ) || ! TYPE_HAS_COMPLEX_ASSIGN_REF ( type ) || TREE_CODE ( exp ) == CONSTRUCTOR || CP_AGGREGATE_TYPE_P ( type ) ) ; return ( is_empty_class ( type ) ? size_zero_node : CLASSTYPE_SIZE_UNIT ( type ) ) ; } else return lhd_expr_size ( exp ) ; }
Langhook for expr_size: Tell the backend that the value of an expression
of non-POD class type does not include any tail padding; a derived class
might have allocated something there.
Langhook for expr_size : Tell the backend that the value of an expression of non - POD class type does not include any tail padding ; a derived class might have allocated something there .
/* The backend should not be interested in the size of an expression
	 of a type with both of these set; all copies of such types must go
	 through a constructor or assignment op.  */ /* But storing a CONSTRUCTOR isn't a copy.  */ /* And, the gimplifier will sometimes make a copy of
		     an aggregate.  In particular, for a case like:

			struct S { S(); };
			struct X { int a; S s; };
			X x = { 0 };

		     the gimplifier will create a temporary with
		     static storage duration, perform static
		     initialization of the temporary, and then copy
		     the result.  Since the "s" subobject is never
		     constructed, this is a valid transformation.  */ /* This would be wrong for a type with virtual bases, but they are
	 caught by the assert above.  */ /* Use the default code.  */