linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Latest GCC-3.3 is much quieter about sign/unsigned comparisons
@ 2003-05-04 21:22 Art Haas
  2003-05-05  6:23 ` Anders Karlsson
  2003-05-05  7:48 ` Tomas Szepe
  0 siblings, 2 replies; 5+ messages in thread
From: Art Haas @ 2003-05-04 21:22 UTC (permalink / raw)
  To: linux-kernel

Hi.

This change ...

2003-05-02  Zack Weinberg  <zack@codesourcery.com>

	PR c/10604
	* c-opts.c (c_common_decode_option <OPT_Wall>): Set
	warn_sign_compare for C++ only.
	* doc/invoke.texi: Clarify documentation of -Wsign-compare.

... has eliminated all the warnings that GCC-3.3 by default printed
with regards to signed/unsigned comparisons. A build of today's BK
with this compiler is much quieter than those previously done
with the 3.3 snapshots.

Art Haas
-- 
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
 -- Theodore Roosevelt, Kansas City Star, 1918

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

* Re: Latest GCC-3.3 is much quieter about sign/unsigned comparisons
  2003-05-04 21:22 Latest GCC-3.3 is much quieter about sign/unsigned comparisons Art Haas
@ 2003-05-05  6:23 ` Anders Karlsson
  2003-05-05 14:20   ` Jörn Engel
  2003-05-05  7:48 ` Tomas Szepe
  1 sibling, 1 reply; 5+ messages in thread
From: Anders Karlsson @ 2003-05-05  6:23 UTC (permalink / raw)
  To: Art Haas; +Cc: LKML

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Hello there, :-)

On Sun, 2003-05-04 at 22:22, Art Haas wrote:
> Hi.
> 
> This change ...
> 
> 2003-05-02  Zack Weinberg  <zack@codesourcery.com>
> 
> 	PR c/10604
> 	* c-opts.c (c_common_decode_option <OPT_Wall>): Set
> 	warn_sign_compare for C++ only.
> 	* doc/invoke.texi: Clarify documentation of -Wsign-compare.
> 
> ... has eliminated all the warnings that GCC-3.3 by default printed
> with regards to signed/unsigned comparisons. A build of today's BK
> with this compiler is much quieter than those previously done
> with the 3.3 snapshots.

Yes, it means the warnings are not printed, it doesn't mean the problem
has gone away though.

I'd still like for someone to tell me if there is a specific reason to
use signed numbers in for example inode.c in one of the filesystems
(can't remember which one of the top of my head). I for one would get
rather surprised if some of my data started getting stored with negative
inodes...

Regards,

/Anders


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Latest GCC-3.3 is much quieter about sign/unsigned comparisons
  2003-05-04 21:22 Latest GCC-3.3 is much quieter about sign/unsigned comparisons Art Haas
  2003-05-05  6:23 ` Anders Karlsson
@ 2003-05-05  7:48 ` Tomas Szepe
  2003-05-05 13:06   ` Dave Jones
  1 sibling, 1 reply; 5+ messages in thread
From: Tomas Szepe @ 2003-05-05  7:48 UTC (permalink / raw)
  To: Art Haas; +Cc: linux-kernel

> [ahaas@airmail.net]
> 
> ... has eliminated all the warnings that GCC-3.3 by default printed
> with regards to signed/unsigned comparisons. A build of today's BK
> with this compiler is much quieter than those previously done
> with the 3.3 snapshots.

Is this a good thing, though?  I'm quite sure those warnings were useful.

-- 
Tomas Szepe <szepe@pinerecords.com>

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

* Re: Latest GCC-3.3 is much quieter about sign/unsigned comparisons
  2003-05-05  7:48 ` Tomas Szepe
@ 2003-05-05 13:06   ` Dave Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Jones @ 2003-05-05 13:06 UTC (permalink / raw)
  To: Tomas Szepe; +Cc: Art Haas, linux-kernel

On Mon, May 05, 2003 at 09:48:04AM +0200, Tomas Szepe wrote:
 > > ... has eliminated all the warnings that GCC-3.3 by default printed
 > > with regards to signed/unsigned comparisons. A build of today's BK
 > > with this compiler is much quieter than those previously done
 > > with the 3.3 snapshots.
 > 
 > Is this a good thing, though?  I'm quite sure those warnings were useful.

In a lot of cases, they were just noise. They are still there with
-W if you really want to see them.

		Dave


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

* Re: Latest GCC-3.3 is much quieter about sign/unsigned comparisons
  2003-05-05  6:23 ` Anders Karlsson
@ 2003-05-05 14:20   ` Jörn Engel
  0 siblings, 0 replies; 5+ messages in thread
From: Jörn Engel @ 2003-05-05 14:20 UTC (permalink / raw)
  To: Anders Karlsson; +Cc: Art Haas, LKML

On Mon, 5 May 2003 07:23:01 +0100, Anders Karlsson wrote:
> On Sun, 2003-05-04 at 22:22, Art Haas wrote:
> > This change ...
> > ... has eliminated all the warnings that GCC-3.3 by default printed
> > with regards to signed/unsigned comparisons. A build of today's BK
> > with this compiler is much quieter than those previously done
> > with the 3.3 snapshots.
> 
> Yes, it means the warnings are not printed, it doesn't mean the problem
> has gone away though.

Which one do you mean? The real signed-unsigned bugs in the kernel or
the problem of gcc to weed out the false positives.

"find /usr/src/linux -type f | xargs cat" will catch every single bug
in the linux kernel, but I bet it won't get too many fixed. Those gcc
warnings are a bit better, but just a bit.

> I'd still like for someone to tell me if there is a specific reason to
> use signed numbers in for example inode.c in one of the filesystems
> (can't remember which one of the top of my head). I for one would get
> rather surprised if some of my data started getting stored with negative
> inodes...

If you manually seperate false positives from real bugs, then those
real ones should get fixed. Feel free to bombard me with any, but try
to keep the ratio of false positives low.

Jörn

-- 
"Translations are and will always be problematic. They inflict violence 
upon two languages." (translation from German)

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

end of thread, other threads:[~2003-05-05 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-04 21:22 Latest GCC-3.3 is much quieter about sign/unsigned comparisons Art Haas
2003-05-05  6:23 ` Anders Karlsson
2003-05-05 14:20   ` Jörn Engel
2003-05-05  7:48 ` Tomas Szepe
2003-05-05 13:06   ` Dave Jones

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 NNTP newsgroup(s).