lkml.org 
[lkml]   [2007]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsparse -Wptr-subtraction-blows: still needed?

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

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2007-05-01 23:11    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site