pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:1713:    /* Attempt to evaluate it to see if it is zero,    * in which case we can throw it away.    *    * NB: The compat test is due to that this changes the semantics    * of calling __INIT() by hand.    */    ptrdiff_t tmp = eval_low($5, 0);    if (tmp >= 1) {    free_node($5);    $5 = NULL; -  if (!SAFE_IS_ZERO(Pike_sp - tmp)) { +  if (!SAFE_IS_ZERO(Pike_sp - tmp) || +  IDENTIFIER_IS_ALIAS(ID_FROM_INT(Pike_compiler->new_program, +  $<number>4)->identifier_flags)) { +  /* NB: Inherited variables get converted into aliases by +  * define_variable, and we need to support clearing +  * of inherited variables. +  */    $5 = mkconstantsvaluenode(Pike_sp - tmp);    }    pop_n_elems(tmp);    }    }    if ($5) {    Pike_compiler->init_node=mknode(F_COMMA_EXPR,Pike_compiler->init_node,    mkcastnode(void_type_string,    mknode(F_ASSIGN,$5,    mkidentifiernode($<number>4))));