https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102078
Bug ID: 102078 Summary: ffinity.c:59:19: error: Signed integer overflow ? Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Source code is for (index = 0; index < sizeof (unsigned) * 8; index++) if (mask & (1 << index)) CPUSET_SET(cpuset, index); maybe better code: for (index = 0; index < sizeof (unsigned) * 8; index++) if (mask & (1UL << index)) CPUSET_SET(cpuset, index);