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

FP narrowing cast not performed during constant expression #56

Closed fuhsnn closed 5 months ago

fuhsnn commented 5 months ago
#include <stdio.h>
int fcast = (float)16777217.0;
int main(void) {
  printf("%d\n", fcast);  // expect 16777216, got 16777217
}