This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/49345] New: Proper casting needed when assigning '-1' to unsigned variables.
- From: "shreyasp at ti dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 9 Jun 2011 17:26:07 +0000
- Subject: [Bug libgomp/49345] New: Proper casting needed when assigning '-1' to unsigned variables.
- Auto-submitted: auto-generated
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