This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgomp/49345] New: Proper casting needed when assigning '-1' to unsigned variables.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49345

           Summary: Proper casting needed when assigning '-1' to unsigned
                    variables.
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: shreyasp@ti.com


The TI compiler throws warnings when compiling the following code in ordered.c:

  /* We're no longer the owner.  */
  ws->ordered_owner = -1;

This should be changed to:

  /* We're no longer the owner.  */
  ws->ordered_owner = (unsigned)-1;

since 'ordered_owner' is an unsigned integer.

There are three occurrences of this in ordered.c. 

Thanks,
Shreyas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]