public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
       [not found] <bug-45372-4@http.gcc.gnu.org/bugzilla/>
@ 2021-07-19  5:18 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-19  5:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45372

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.7.0
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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.

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

* [Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
  2010-08-21 22:12 [Bug bootstrap/45372] New: " jay dot krell at cornell dot edu
  2010-08-21 22:13 ` [Bug bootstrap/45372] " jay dot krell at cornell dot edu
  2010-08-22  8:17 ` schwab at linux-m68k dot org
@ 2010-08-22  8:57 ` jay dot krell at cornell dot edu
  2 siblings, 0 replies; 4+ messages in thread
From: jay dot krell at cornell dot edu @ 2010-08-22  8:57 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
  2010-08-21 22:12 [Bug bootstrap/45372] New: " jay dot krell at cornell dot edu
  2010-08-21 22:13 ` [Bug bootstrap/45372] " jay dot krell at cornell dot edu
@ 2010-08-22  8:17 ` schwab at linux-m68k dot org
  2010-08-22  8:57 ` jay dot krell at cornell dot edu
  2 siblings, 0 replies; 4+ messages in thread
From: schwab at linux-m68k dot org @ 2010-08-22  8:17 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u
  2010-08-21 22:12 [Bug bootstrap/45372] New: " jay dot krell at cornell dot edu
@ 2010-08-21 22:13 ` jay dot krell at cornell dot edu
  2010-08-22  8:17 ` schwab at linux-m68k dot org
  2010-08-22  8:57 ` jay dot krell at cornell dot edu
  2 siblings, 0 replies; 4+ messages in thread
From: jay dot krell at cornell dot edu @ 2010-08-21 22:13 UTC (permalink / raw)
  To: gcc-bugs



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


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

end of thread, other threads:[~2021-07-19  5:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45372-4@http.gcc.gnu.org/bugzilla/>
2021-07-19  5:18 ` [Bug bootstrap/45372] warning coverage.c assigns -1 to unsigned, suggest -1u pinskia at gcc dot gnu.org
2010-08-21 22:12 [Bug bootstrap/45372] New: " jay dot krell at cornell dot edu
2010-08-21 22:13 ` [Bug bootstrap/45372] " jay dot krell at cornell dot edu
2010-08-22  8:17 ` schwab at linux-m68k dot org
2010-08-22  8:57 ` jay dot krell at cornell dot edu

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