FreeBSD/contrib/gcc/cp/typeck.c
/* Build a binary-operation expression, after performing default
   conversions on the operands.  CODE is the kind of expression to build.  */
Build a binary-operation expression, after performing default
conversions on the operands.  CODE is the kind of expression to build.
Build a binary - operation expression after performing default conversions on the operands . CODE is the kind of expression to build .
tree
build_x_binary_op (enum tree_code code, tree arg1, enum tree_code arg1_code,
		   tree arg2, enum tree_code arg2_code, bool *overloaded_p)
{
  tree orig_arg1;
  tree orig_arg2;
  tree expr;
  orig_arg1 = arg1;
  orig_arg2 = arg2;
  if (processing_template_decl)
    {
      if (type_dependent_expression_p (arg1)
	  || type_dependent_expression_p (arg2))
	return build_min_nt (code, arg1, arg2);
      arg1 = build_non_dependent_expr (arg1);
      arg2 = build_non_dependent_expr (arg2);
    }
  if (code == DOTSTAR_EXPR)
    expr = build_m_component_ref (arg1, arg2);
  else
    expr = build_new_op (code, LOOKUP_NORMAL, arg1, arg2, NULL_TREE,
			 overloaded_p);
  if (warn_parentheses
      && !processing_template_decl
      && !error_operand_p (arg1)
      && !error_operand_p (arg2)
      && (code != LSHIFT_EXPR
	  || !IS_AGGR_TYPE (TREE_TYPE (arg1))))
    warn_about_parentheses (code, arg1_code, arg2_code);
  if (processing_template_decl && expr != error_mark_node)
    return build_min_non_dep (code, expr, orig_arg1, orig_arg2);
  return expr;
}
tree build_x_binary_op ( enum tree_code code , tree arg1 , enum tree_code arg1_code , tree arg2 , enum tree_code arg2_code , bool * overloaded_p ) { tree orig_arg1 ; tree orig_arg2 ; tree expr ; orig_arg1 = arg1 ; orig_arg2 = arg2 ; if ( processing_template_decl ) { if ( type_dependent_expression_p ( arg1 ) || type_dependent_expression_p ( arg2 ) ) return build_min_nt ( code , arg1 , arg2 ) ; arg1 = build_non_dependent_expr ( arg1 ) ; arg2 = build_non_dependent_expr ( arg2 ) ; } if ( code == DOTSTAR_EXPR ) expr = build_m_component_ref ( arg1 , arg2 ) ; else expr = build_new_op ( code , LOOKUP_NORMAL , arg1 , arg2 , NULL_TREE , overloaded_p ) ; if ( warn_parentheses && ! processing_template_decl && ! error_operand_p ( arg1 ) && ! error_operand_p ( arg2 ) && ( code != LSHIFT_EXPR || ! IS_AGGR_TYPE ( TREE_TYPE ( arg1 ) ) ) ) warn_about_parentheses ( code , arg1_code , arg2_code ) ; if ( processing_template_decl && expr != error_mark_node ) return build_min_non_dep ( code , expr , orig_arg1 , orig_arg2 ) ; return expr ; }
Build a binary-operation expression, after performing default
conversions on the operands.
Build a binary - operation expression after performing default conversions on the operands .
/* Check for cases such as x+y<<z which users are likely to
     misinterpret.  But don't warn about obj << x + y, since that is a
     common idiom for I/O.  */