FreeBSD/contrib/gcc/cp/typeck.c
/* Return the common type of two types.
   We assume that comptypes has already been done and returned 1;
   if that isn't so, this may crash.

   This is the type for the result of most arithmetic operations
   if the operands have the given two types.  */
Return the common type of two types.
We assume that comptypes has already been done and returned 1;
if that isn't so, this may crash.

This is the type for the result of most arithmetic operations
if the operands have the given two types.
Return the common type of two types . We assume that comptypes has already been done and returned 1 ; if that isn ' t so this may crash . This is the type for the result of most arithmetic operations if the operands have the given two types .
tree
common_type (tree t1, tree t2)
{
  enum tree_code code1;
  enum tree_code code2;
  if (t1 == error_mark_node || t2 == error_mark_node)
    return error_mark_node;
  code1 = TREE_CODE (t1);
  code2 = TREE_CODE (t2);
  if ((ARITHMETIC_TYPE_P (t1) || code1 == ENUMERAL_TYPE
       || code1 == VECTOR_TYPE)
      && (ARITHMETIC_TYPE_P (t2) || code2 == ENUMERAL_TYPE
	  || code2 == VECTOR_TYPE))
    return type_after_usual_arithmetic_conversions (t1, t2);
  else if ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2))
	   || (TYPE_PTRMEM_P (t1) && TYPE_PTRMEM_P (t2))
	   || (TYPE_PTRMEMFUNC_P (t1) && TYPE_PTRMEMFUNC_P (t2)))
    return composite_pointer_type (t1, t2, error_mark_node, error_mark_node,
				   "conversion");
  else
    gcc_unreachable ();
}
tree common_type ( tree t1 , tree t2 ) { enum tree_code code1 ; enum tree_code code2 ; if ( t1 == error_mark_node || t2 == error_mark_node ) return error_mark_node ; code1 = TREE_CODE ( t1 ) ; code2 = TREE_CODE ( t2 ) ; if ( ( ARITHMETIC_TYPE_P ( t1 ) || code1 == ENUMERAL_TYPE || code1 == VECTOR_TYPE ) && ( ARITHMETIC_TYPE_P ( t2 ) || code2 == ENUMERAL_TYPE || code2 == VECTOR_TYPE ) ) return type_after_usual_arithmetic_conversions ( t1 , t2 ) ; else if ( ( TYPE_PTR_P ( t1 ) && TYPE_PTR_P ( t2 ) ) || ( TYPE_PTRMEM_P ( t1 ) && TYPE_PTRMEM_P ( t2 ) ) || ( TYPE_PTRMEMFUNC_P ( t1 ) && TYPE_PTRMEMFUNC_P ( t2 ) ) ) return composite_pointer_type ( t1 , t2 , error_mark_node , error_mark_node , " " ) ; else gcc_unreachable ( ) ; }
Return the common type of two types.
Return the common type of two types .
/* If one type is nonsense, bail.  */