goplus / c2go

Convert C to Go
Apache License 2.0
306 stars 21 forks source link

c2go pointer subtraction error #153

Closed visualfc closed 2 years ago

visualfc commented 2 years ago
#include <stdio.h>

int main() {
    unsigned int big[126];
    unsigned int *a,*r;
    big[0] = 0;
    big[1] = 100000;
    int i = 0;
    int e = 0;
    a = &big[1];
    r = &big[0];

    for (i=10, e=9*(r-a); *a>=i; i*=10, e++);
    printf("=> %d\n", e);  //-4
}

c2go error

-139