pike.git / src / las.cmod

version» Context lines:

pike.git/src/las.cmod:1519:    }   #endif /* PIKE_DEBUG */       if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST &&    type->type != PIKE_T_AUTO ) {    if (type == void_type_string) {    yywarning("Soft cast to void.");    return mknode(F_POP_VALUE, n, 0);    }    -  if(type==n->type) { -  struct pike_string *t1 = describe_type(type); -  yywarning("Soft cast to %S is a noop.", t1); -  free_string(t1); -  return n; -  } -  +     if (n->type) {    if (!(result_type = soft_cast(type, n->type, SOFT_WEAKER))) {    ref_push_type_value(n->type);    ref_push_type_value(type);    yytype_report(REPORT_ERROR,    NULL, 0, type,    NULL, 0, n->type,    2, "Soft cast of %O to %O isn't a valid cast."); -  } else if (result_type == n->type) { -  ref_push_type_value(n->type); -  ref_push_type_value(type); -  yytype_report(REPORT_WARNING, -  NULL, 0, NULL, -  NULL, 0, NULL, -  2, "Soft cast of %O to %O is a noop."); +     }    }    }       res = mkemptynode();    res->token = F_SOFT_CAST;    if (result_type) {    res->type = result_type;    } else {    copy_pike_type(res->type, type);