int overwritten;
type *super, *inhenttype;
entity *inhent, *thisent;
- mangle_inherited_name_func *mfunc = (mangle_inherited_name_func *)env;
+ mangle_inherited_name_func *mfunc = *(mangle_inherited_name_func **)env;
for(i = 0; i < get_class_n_supertypes(clss); i++) {
super = get_class_supertype(clss, i);
void resolve_inheritance(mangle_inherited_name_func *mfunc) {
if (!mfunc)
mfunc = default_mangle_inherited_name;
- class_walk_super2sub(copy_entities_from_superclass, NULL, (void *)mfunc);
+ class_walk_super2sub(copy_entities_from_superclass, NULL, (void *)&mfunc);
}
type *tp = get_irp_type(i);
if (is_Class_type(tp) && type_not_visited(tp)) { /* For others there is nothing to accumulate. */
int j, n_subtypes = get_class_n_subtypes(tp);
- int has_unmarked_subtype = false;
+ int has_unmarked_subtype = 0;
assert(get_type_visited(tp) < get_master_type_visited()-1);
- for (j = 0; j < n_subtypes && !has_unmarked_subtype; ++j) {
+ for (j = 0; j < n_subtypes; ++j) {
type *stp = get_class_subtype(tp, j);
- if (type_not_visited(stp)) has_unmarked_subtype = true;
+ if (type_not_visited(stp)) {
+ has_unmarked_subtype = 1;
+ break;
+ }
}
/* This is a good starting point. */
type *tp = get_irp_type(i);
if (is_Class_type(tp) && type_not_visited(tp)) { /* For others there is nothing to accumulate. */
int j, n_supertypes = get_class_n_supertypes(tp);
- int has_unmarked_supertype = false;
+ int has_unmarked_supertype = 0;
assert(get_type_visited(tp) < get_master_type_visited()-1);
- for (j = 0; j < n_supertypes && !has_unmarked_supertype; ++j) {
+ for (j = 0; j < n_supertypes; ++j) {
type *stp = get_class_supertype(tp, j);
- if (type_not_visited(stp)) has_unmarked_supertype = true;
+ if (type_not_visited(stp)) {
+ has_unmarked_supertype = 1;
+ break;
+ }
}
/* This is a good starting point. */