Interested in compiler bugs? Here's one for x86 in e.g. gcc-14.2.0 -O1 -m32: void foo(const void *x) { if (isnan(*(float *) x)) printf("%x\n",*(int *) x); } int main() { int u = 0x7f987654; printf("%x\n",u); foo(&u); return 0; } (using math.h, stdio.h). Workaround: volatile.