Branch: Tag:

2014-12-04

2014-12-04 19:23:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Improved RUNTIME_CHECK_TYPES mode.

Avoid generating new compiler errors when running with -rt.

387:    if (runtime_options & RUNTIME_CHECK_TYPES) {    node *p = n->parent;    if (CAR(p) == n) { -  (_CAR(p) = mksoftcastnode(t, n))->parent = p; +  (_CAR(p) = mksoftcastnode(t, mkcastnode(mixed_type_string, n))) +  ->parent = p;    } else if (CDR(p) == n) { -  (_CDR(p) = mksoftcastnode(t, n))->parent = p; +  (_CDR(p) = mksoftcastnode(t, mkcastnode(mixed_type_string, n))) +  ->parent = p;    } else {    yywarning("Failed to find place to insert soft cast.");    }
3416:    free_string(t1);    }    if (runtime_options & RUNTIME_CHECK_TYPES) { -  _CAR(n) = mksoftcastnode(CDR(n)->type, CAR(n)); +  _CAR(n) = mksoftcastnode(CDR(n)->type, +  mkcastnode(mixed_type_string, CAR(n)));    }    }    }