pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:1557:      /* Identifier type. Value on type stack.    *    * NB: Introduces shift-reduce conflict on TOK_LOCAL_ID.    */   identifier_type: idents    {    if ($1) {    fix_type_field($1);    -  if (!pike_types_le($1->type, typeable_type_string) && +  if (!pike_types_le($1->type, typeable_type_string, 0, 0) &&    (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES)) {    yytype_report(REPORT_WARNING,    $1->current_file, $1->line_number, typeable_type_string,    $1->current_file, $1->line_number, $1->type,    0, "Invalid type.");    }    }       resolv_type($1);   
pike.git/src/language.yacc:1833:   new_name: TOK_IDENTIFIER    {    struct pike_type *type;    node *n;       push_finished_type(Pike_compiler->compiler_frame->current_type);    if (!TEST_COMPAT(8,0) &&    (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES) &&    (Pike_compiler->compiler_frame->current_type->type != PIKE_T_AUTO)) {    if (!pike_types_le(zero_type_string, -  Pike_compiler->compiler_frame->current_type)) { +  Pike_compiler->compiler_frame->current_type, 0, 0)) {    if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    ref_push_string($1->u.sval.u.string);    yytype_report(REPORT_WARNING, NULL, 0, zero_type_string,    NULL, 0, Pike_compiler->compiler_frame->current_type,    1, "Type does not contain zero for variable without "    "initializer %s. Type adjusted.");    }    push_type(PIKE_T_ZERO);    push_type(T_OR);    }
pike.git/src/language.yacc:5195:    if (frame->current_number_of_locals == MAX_LOCAL-1)    {    my_yyerror("Too many local variables: no space for local variable %S.",    str);    free_type(type);    if (def) free_node(def);    return -1;    } else {    int var = frame->current_number_of_locals;    -  if (pike_types_le(type, void_type_string)) { +  if (pike_types_le(type, void_type_string, 0, 0)) {    if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {    yywarning("Declaring local variable %S with type void "    "(converted to type zero).", str);    }    free_type(type);    copy_pike_type(type, zero_type_string);    }    frame->variable[var].type = type;    frame->variable[var].name = str;    reference_shared_string(str);    frame->variable[var].def = def;       frame->variable[var].line = THIS_COMPILATION->lex.current_line;    copy_shared_string(frame->variable[var].file,    THIS_COMPILATION->lex.current_file);       if (frame->generator_local != -1) {    frame->variable[var].flags = LOCAL_VAR_IS_USED | LOCAL_VAR_USED_IN_SCOPE; -  } else if (pike_types_le(void_type_string, type)) { +  } else if (pike_types_le(void_type_string, type, 0, 0)) {    /* Don't warn about unused voidable variables. */    frame->variable[var].flags = LOCAL_VAR_IS_USED;    } else {    frame->variable[var].flags = 0;    }       frame->current_number_of_locals++;    if(frame->current_number_of_locals > frame->max_number_of_locals)    {    frame->max_number_of_locals = frame->current_number_of_locals;