public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/102078] New: ffinity.c:59:19: error: Signed integer overflow ?
@ 2021-08-26 12:31 dcb314 at hotmail dot com
  2021-08-26 12:53 ` [Bug ada/102078] affinity.c:59:19: " marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2021-08-26 12:31 UTC (permalink / raw)
  To: gcc-bugs

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);

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-31  7:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 12:31 [Bug ada/102078] New: ffinity.c:59:19: error: Signed integer overflow ? dcb314 at hotmail dot com
2021-08-26 12:53 ` [Bug ada/102078] affinity.c:59:19: " marxin at gcc dot gnu.org
2021-08-30  7:21 ` marxin at gcc dot gnu.org
2021-08-30  7:31 ` jakub at gcc dot gnu.org
2021-08-30  7:35 ` jakub at gcc dot gnu.org
2021-08-30 16:27 ` dcb314 at hotmail dot com
2021-08-30 16:35 ` jakub at gcc dot gnu.org
2021-08-31  7:21 ` dcb314 at hotmail dot com
2021-08-31  7:26 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).