/* Operate on pointers, result type is a pointer */
} else if (IsClassPtr (lhst) && IsClassPtr (rhst)) {
/* Left is pointer, right is pointer, must scale result */
- if (TypeCmp (Indirect (lhst), Indirect (rhst)) < TC_EQUAL) {
+ if (TypeCmp (Indirect (lhst), Indirect (rhst)) < TC_QUAL_DIFF) {
Error ("Incompatible pointer types");
} else {
lval->ConstVal = (lval->ConstVal - lval2.ConstVal) / PSizeOf (lhst);
flags = CF_PTR;
} else if (IsClassPtr (lhst) && IsClassPtr (rhst)) {
/* Left is pointer, right is pointer, must scale result */
- if (TypeCmp (Indirect (lhst), Indirect (rhst)) < TC_EQUAL) {
+ if (TypeCmp (Indirect (lhst), Indirect (rhst)) < TC_QUAL_DIFF) {
Error ("Incompatible pointer types");
} else {
rscale = PSizeOf (lhst);
flags = CF_PTR;
} else if (IsClassPtr (lhst) && IsClassPtr (rhst)) {
/* Left is pointer, right is pointer, must scale result */
- if (TypeCmp (Indirect (lhst), Indirect (rhst)) < TC_EQUAL) {
+ if (TypeCmp (Indirect (lhst), Indirect (rhst)) < TC_QUAL_DIFF) {
Error ("Incompatible pointer types");
} else {
rscale = PSizeOf (lhst);
g_push (CF_PTR | CF_UNSIGNED, 0);
/* Check for equality of the structs */
- if (TypeCmp (ltype, lval2.Type) < TC_EQUAL) {
+ if (TypeCmp (ltype, lval2.Type) < TC_STRICT_COMPATIBLE) {
Error ("Incompatible types");
}