improved qualifier checking

This commit is contained in:
eck
1989-11-13 14:01:50 +00:00
parent c30769327b
commit 776233c718
3 changed files with 29 additions and 28 deletions

View File

@@ -236,7 +236,7 @@ ch3bin(expp, oper, expr)
if ( is_struct_or_union(expp_tp->tp_fund)
|| is_struct_or_union(expr->ex_type->tp_fund)
) {
if (!equal_type(expp_tp, expr->ex_type, 0))
if (!equal_type(expp_tp, expr->ex_type, -1))
expr_error(*expp, "illegal balance");
}
else
@@ -284,7 +284,7 @@ pntminuspnt(expp, oper, expr)
*/
struct type *up_type = (*expp)->ex_type->tp_up;
if (!equal_type(up_type, expr->ex_type->tp_up, 0)) {
if (!equal_type(up_type, expr->ex_type->tp_up, -1)) {
expr_error(*expp, "subtracting incompatible pointers");
free_expression(expr);
erroneous2int(expp);