[Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45372 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |4.7.0 Status|UNCONFIRMED |RESOLVED --- Comment #4 from Andrew Pinski --- Warnings during the first stage will not always be correct. Anyways this has been fixed since r0-108388 which changes the code a lot and removed the assignment. So all fixed for GCC 4.7.0.
[Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
--- Comment #2 from schwab at linux-m68k dot org 2010-08-22 08:16 --- Assigning -1 to an unsigned type is always safe. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45372
[Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
--- Comment #3 from jay dot krell at cornell dot edu 2010-08-22 08:56 --- Best imho to put in the cast to quash the warning. To be warning free -- esp. given how close you already are. Sometimes I think warning-free across a range of compilers is untenable. But you are in fact already very close. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45372
[Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
--- Comment #1 from jay dot krell at cornell dot edu 2010-08-21 22:13 --- clarification, where I assert what gives no warning, I was just testing with like: -bash-3.00$ cat 1.c unsigned a = (unsigned)-1; unsigned b = (0u - 1u); I didn't yet test changing coverage.c. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45372