fuhsnn / slimcc

C11 compiler with GNU / C23 extensions for x86-64 Linux, able to build Python and PostgreSQL
MIT License
24 stars 3 forks source link

`f32`&`f64` to `u64` cast broken #49

Closed fuhsnn closed 6 months ago

fuhsnn commented 6 months ago
#include <stdio.h>

int main(void) {
  printf("%llu\n", (unsigned long long) 13835058055282163712.0f);
  printf("%llu\n", (unsigned long long) 13835058055282163712.0);
  // expect 13835058055282163712
  // got 9223372036854775808
}