mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-24 12:42:32 +00:00
[qfcc] Catch some error expressions
Not really enough in general as an internal error still occurs, but the triggering error is caused by some broken changes.
This commit is contained in:
parent
261ea0c4de
commit
471f5488ff
2 changed files with 12 additions and 0 deletions
|
@ -1493,6 +1493,9 @@ field_expr (const expr_t *e1, const expr_t *e2)
|
|||
|
||||
const expr_t *offset = new_short_expr (field->s.offset);
|
||||
e1 = offset_pointer_expr (e1, offset);
|
||||
if (e1->type == ex_error) {
|
||||
return e1;
|
||||
}
|
||||
e1 = cast_expr (pointer_type (field->type), e1);
|
||||
return unary_expr ('.', e1);
|
||||
} else if (is_class (t1->t.fldptr.type)) {
|
||||
|
@ -1507,6 +1510,9 @@ field_expr (const expr_t *e1, const expr_t *e2)
|
|||
const expr_t *offset = new_short_expr (ivar->s.offset);
|
||||
e1 = offset_pointer_expr (e1, offset);
|
||||
e1 = cast_expr (pointer_type (ivar->type), e1);
|
||||
if (e1->type == ex_error) {
|
||||
return e1;
|
||||
}
|
||||
return unary_expr ('.', e1);
|
||||
}
|
||||
} else if (is_algebra (t1)) {
|
||||
|
@ -2664,6 +2670,9 @@ offset_pointer_expr (const expr_t *pointer, const expr_t *offset)
|
|||
} else {
|
||||
ptr = cast_expr (&type_int, pointer);
|
||||
}
|
||||
if (ptr->type == ex_error) {
|
||||
return ptr;
|
||||
}
|
||||
ptr = binary_expr ('+', ptr, offset);
|
||||
return cast_expr (ptr_type, ptr);
|
||||
}
|
||||
|
|
|
@ -170,6 +170,9 @@ super_expr (class_type_t *class_type)
|
|||
e = new_symbol_expr (class_pointer_symbol (class));
|
||||
e = assign_expr (field_expr (super, new_name_expr ("class")),
|
||||
field_expr (e, new_name_expr ("super_class")));
|
||||
if (e->type == ex_error) {
|
||||
return e;
|
||||
}
|
||||
append_expr (super_block, e);
|
||||
|
||||
e = address_expr (super, 0);
|
||||
|
|
Loading…
Reference in a new issue