linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sparse -Wptr-subtraction-blows: still needed?
@ 2007-05-01 21:08 Josh Triplett
  2007-05-01 21:43 ` Linus Torvalds
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Triplett @ 2007-05-01 21:08 UTC (permalink / raw)
  To: linux-sparse, linux-kernel; +Cc: Linus Torvalds, Al Viro

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


Sparse has a warning -Wptr-subtraction-blows (off by default) which generates
a warning for any pointer subtractions.  This warning relates to GCC
shortcomings observed in 2005; the original log message:

> commit 6889bd0f84939675c743229d6fe623513b95e057
> Author: Linus Torvalds <torvalds@ppc970.osdl.org>
> Date:   Fri Jan 7 15:06:24 2005 -0700
>
>     Add option "-Wptr-subtraction-blows" to warn about expensive
>     pointer subtractions.
>     
>     Not only does it generate bad code (that can often be rewritten
>     to not do that), it also causes gcc to go into horrible contortions,
>     and Al Viro reports that it can make a factor of 2.5 difference in
>     kernel build times to have just a few of these in common header
>     file inline functions.

Does this still apply?  Do current versions of GCC still have this problem?
If not, can the option and warning go away?

- Josh Triplett


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

end of thread, other threads:[~2007-05-02 12:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-01 21:08 sparse -Wptr-subtraction-blows: still needed? Josh Triplett
2007-05-01 21:43 ` Linus Torvalds
2007-05-01 23:59   ` Josh Triplett
2007-05-02  0:24     ` Linus Torvalds
2007-05-02  0:35       ` Al Viro
2007-05-02 12:02       ` Alan Cox
2007-05-02 13:19         ` Andi Kleen
2007-05-02  0:26     ` Al Viro
2007-05-02  0:02   ` Al Viro
2007-05-02  2:42   ` Dave Jones
2007-05-02 13:03     ` Andi Kleen

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