[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4637AC3D.6000008@freedesktop.org>
Date: Tue, 01 May 2007 14:08:13 -0700
From: Josh Triplett <josh@...edesktop.org>
To: linux-sparse@...r.kernel.org, linux-kernel@...r.kernel.org
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Al Viro <viro@....linux.org.uk>
Subject: sparse -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@...970.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
Download attachment "signature.asc" of type "application/pgp-signature" (253 bytes)
Powered by blists - more mailing lists