Branch: Tag:

2011-12-09

2011-12-09 20:46:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Type-checker: Send the proper flags to get_first_arg_type().

3590: Inside #if defined(NEW_ARG_CHECK)
   /* Too few arguments or similar. */    copy_pike_type(n->type, mixed_type_string);    -  if ((s = get_first_arg_type(dmalloc_touch(struct pike_type *, f), 0))) { +  if ((s = get_first_arg_type(dmalloc_touch(struct pike_type *, f), 0)) || +  (s = get_first_arg_type(dmalloc_touch(struct pike_type *, f), +  CALL_NOT_LAST_ARG))) {    yytype_report(REPORT_ERROR, NULL, 0, s,    NULL, 0, NULL,    0, "Too few arguments to %S (got %d).",
4197:    if (sscanf_type) {    if (!(n->type = new_get_return_type(sscanf_type, 0))) {    struct pike_type *expected; -  if ((expected = get_first_arg_type(sscanf_type, 0))) { +  if ((expected = get_first_arg_type(sscanf_type, 0)) || +  (expected = get_first_arg_type(sscanf_type, CALL_NOT_LAST_ARG))) {    yytype_report(REPORT_ERROR,    NULL, 0, expected,    NULL, 0, NULL,