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 <[email protected]> > 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:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: sparse -Wptr-subtraction-blows: still needed?
- From: Linus Torvalds <[email protected]>
- Re: sparse -Wptr-subtraction-blows: still needed?
- Prev by Date: Re: [PATCH] Propagate errors from find in scripts/gen_initramfs_list.sh
- Next by Date: Re: 2.6.22 -mm merge plans: slub
- Previous by thread: Re: [patch 04/33] m68k: Atari keyboard and mouse support.
- Next by thread: Re: sparse -Wptr-subtraction-blows: still needed?
- Index(es):