FreeBSD/contrib/gcc/cp/tree.c
/* Like stabilize_expr, but for an initialization.  

   If the initialization is for an object of class type, this function
   takes care not to introduce additional temporaries.

   Returns TRUE iff the expression was successfully pre-evaluated,
   i.e., if INIT is now side-effect free, except for, possible, a
   single call to a constructor.  */
Like stabilize_expr, but for an initialization.
If the initialization is for an object of class type, this function
takes care not to introduce additional temporaries.

Returns TRUE iff the expression was successfully pre-evaluated,
i.e., if INIT is now side-effect free, except for, possible, a
single call to a constructor.
Like stabilize_expr but for an initialization . If the initialization is for an object of class type this function takes care not to introduce additional temporaries . Returns TRUE iff the expression was successfully pre - evaluated i . e . if INIT is now side - effect free except for possible a single call to a constructor .
bool
stabilize_init (tree init, tree *initp)
{
  tree t = init;
  *initp = NULL_TREE;
  if (t == error_mark_node)
    return true;
  if (TREE_CODE (t) == INIT_EXPR
      && TREE_CODE (TREE_OPERAND (t, 1)) != TARGET_EXPR)
    {
      TREE_OPERAND (t, 1) = stabilize_expr (TREE_OPERAND (t, 1), initp);
      return true;
    }
  if (TREE_CODE (t) == INIT_EXPR)
    t = TREE_OPERAND (t, 1);
  if (TREE_CODE (t) == TARGET_EXPR)
    t = TARGET_EXPR_INITIAL (t);
  if (TREE_CODE (t) == COMPOUND_EXPR)
    t = expr_last (t);
  if (TREE_CODE (t) == CONSTRUCTOR
      && EMPTY_CONSTRUCTOR_P (t))
    return true;
  if (TREE_CODE (t) == COND_EXPR)
    return false;
  if (TREE_CODE (t) == CALL_EXPR
      || TREE_CODE (t) == AGGR_INIT_EXPR)
    {
      stabilize_call (t, initp);
      return true;
    }
  return TREE_SIDE_EFFECTS (init);
}
bool stabilize_init ( tree init , tree * initp ) { tree t = init ; * initp = NULL_TREE ; if ( t == error_mark_node ) return true ; if ( TREE_CODE ( t ) == INIT_EXPR && TREE_CODE ( TREE_OPERAND ( t , 1 ) ) != TARGET_EXPR ) { TREE_OPERAND ( t , 1 ) = stabilize_expr ( TREE_OPERAND ( t , 1 ) , initp ) ; return true ; } if ( TREE_CODE ( t ) == INIT_EXPR ) t = TREE_OPERAND ( t , 1 ) ; if ( TREE_CODE ( t ) == TARGET_EXPR ) t = TARGET_EXPR_INITIAL ( t ) ; if ( TREE_CODE ( t ) == COMPOUND_EXPR ) t = expr_last ( t ) ; if ( TREE_CODE ( t ) == CONSTRUCTOR && EMPTY_CONSTRUCTOR_P ( t ) ) return true ; if ( TREE_CODE ( t ) == COND_EXPR ) return false ; if ( TREE_CODE ( t ) == CALL_EXPR || TREE_CODE ( t ) == AGGR_INIT_EXPR ) { stabilize_call ( t , initp ) ; return true ; } return TREE_SIDE_EFFECTS ( init ) ; }
Like stabilize_expr, but for an initialization.
Like stabilize_expr but for an initialization .
/* Default-initialization.  */ /* If the initializer is a COND_EXPR, we can't preevaluate
     anything.  */ /* The initialization is being performed via a bitwise copy -- and
     the item copied may have side effects.  */