unsigned constants truncated (csmith)
ID0000762: This issue was created automatically from Mantis Issue 762. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0000762 | Frama-C | Kernel | public | 2011-03-23 | 2011-10-10 |
Reporter | pascal | Assigned To | virgile | Resolution | fixed |
Priority | normal | Severity | minor | Reproducibility | always |
Platform | - | OS | - | OS Version | - |
Product Version | Frama-C Carbon-20110201 | Target Version | - | Fixed in Version | Frama-C Nitrogen-20111001 |
Description :
unsigned long long g_3 = 18446744073709551615U;
main(){ printf("%llu\n", g_3); }
gcc: 18446744073709551615
~/ppc/bin/toplevel.opt -val t_64.c g_3 ? {4294967295; }
GCC is right. "The type of an integer constant is the first of the corresponding list in which its value can be represented", pages 55-56 of the C99 standard.
Additional Information :
Does not seem related to bug 745: the program is analyzed correctly with ULL as the constant's suffix.