[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-31 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 --- Comment #7 from Jakub Jelinek --- (In reply to David Binderman from comment #6) > I guess there are some machines where unsigned int is 64 bit. Even if there are (not aware of any such target), 1U << index would be enough for that. The cod

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-31 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 --- Comment #6 from David Binderman --- (In reply to David Binderman from comment #4) > Full cppcheck error message is > > gcc/ada/affinity.c:59:19: error: Signed integer overflow for expression > '1< > I think cppcheck is worried if index run

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 --- Comment #5 from Jakub Jelinek --- index doesn't go to 32, just to 31. And whether 1 << 31 or -1 << 31 etc. is or isn't UB heavily depends on the language and standard version, C++20 and later accepts both, C89 and C++98 were fuzzy, 1 << 31 i

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-30 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 --- Comment #4 from David Binderman --- Full cppcheck error message is gcc/ada/affinity.c:59:19: error: Signed integer overflow for expression '1<

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 --- Comment #3 from Jakub Jelinek --- Actually no, it is in libada and built only for VxWorks, maybe it is built with C rather than C++. In that case it would indeed be UB.

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 Jakub Jelinek changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Commen

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-30 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 Martin Liška changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1

[Bug ada/102078] affinity.c:59:19: error: Signed integer overflow ?

2021-08-26 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078 Martin Liška changed: What|Removed |Added Last reconfirmed||2021-08-26 Status|UNCONFIRME