6c: return vlong result for pointer subtraction
This commit is contained in:
parent
3e38194d72
commit
9c99d0c8d3
1 changed files with 8 additions and 8 deletions
|
@ -692,14 +692,6 @@ arith(Node *n, int f)
|
||||||
if(w < 1 || n->left->type->link == T || n->left->type->link->width < 1)
|
if(w < 1 || n->left->type->link == T || n->left->type->link->width < 1)
|
||||||
goto bad;
|
goto bad;
|
||||||
n->type = types[ewidth[TIND] <= ewidth[TLONG]? TLONG: TVLONG];
|
n->type = types[ewidth[TIND] <= ewidth[TLONG]? TLONG: TVLONG];
|
||||||
if(1 && ewidth[TIND] > ewidth[TLONG]){
|
|
||||||
n1 = new1(OXXX, Z, Z);
|
|
||||||
*n1 = *n;
|
|
||||||
n->op = OCAST;
|
|
||||||
n->left = n1;
|
|
||||||
n->right = Z;
|
|
||||||
n->type = types[TLONG];
|
|
||||||
}
|
|
||||||
if(w > 1) {
|
if(w > 1) {
|
||||||
n1 = new1(OXXX, Z, Z);
|
n1 = new1(OXXX, Z, Z);
|
||||||
*n1 = *n;
|
*n1 = *n;
|
||||||
|
@ -715,6 +707,14 @@ arith(Node *n, int f)
|
||||||
n1->vconst = w;
|
n1->vconst = w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(0 && ewidth[TIND] > ewidth[TLONG]){
|
||||||
|
n1 = new1(OXXX, Z, Z);
|
||||||
|
*n1 = *n;
|
||||||
|
n->op = OCAST;
|
||||||
|
n->left = n1;
|
||||||
|
n->right = Z;
|
||||||
|
n->type = types[TLONG];
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!sametype(n->type, n->left->type)) {
|
if(!sametype(n->type, n->left->type)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue