FreeBSD/contrib/gcc/cp/typeck.c
/* EXPR is an expression with an integral or enumeration type.
   Perform the integral promotions in [conv.prom], and return the
   converted value.  */
EXPR is an expression with an integral or enumeration type.
Perform the integral promotions in [conv.prom], and return the
converted value.
EXPR is an expression with an integral or enumeration type . Perform the integral promotions in [ conv . prom ] and return the converted value .
tree
perform_integral_promotions (tree expr)
{
  tree type;
  tree promoted_type;
  type = is_bitfield_expr_with_lowered_type (expr);
  if (!type || TREE_CODE (type) != ENUMERAL_TYPE)
    type = TREE_TYPE (expr);
  gcc_assert (INTEGRAL_OR_ENUMERATION_TYPE_P (type));
  promoted_type = type_promotes_to (type);
  if (type != promoted_type)
    expr = cp_convert (promoted_type, expr);
  return expr;
}
tree perform_integral_promotions ( tree expr ) { tree type ; tree promoted_type ; type = is_bitfield_expr_with_lowered_type ( expr ) ; if ( ! type || TREE_CODE ( type ) != ENUMERAL_TYPE ) type = TREE_TYPE ( expr ) ; gcc_assert ( INTEGRAL_OR_ENUMERATION_TYPE_P ( type ) ) ; promoted_type = type_promotes_to ( type ) ; if ( type != promoted_type ) expr = cp_convert ( promoted_type , expr ) ; return expr ; }
EXPR is an expression with an integral or enumeration type.
EXPR is an expression with an integral or enumeration type .
/* [conv.prom]

     If the bitfield has an enumerated type, it is treated as any
     other value of that type for promotion purposes.  */