fuhsnn/slimcc

Wrong constant evaluation of floating-point comparison and logical-not

Closed this issue · 1 comments

#include <stdio.h>
int fpeq = 0.1 == 0.2;
int fpnot = !0.1;
int main(void) {
  printf("%d,%d\n", fpeq, fpnot); // expected 0,0; got 1,1
}

Fixed with e6a2869 and 900c7e3