linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparse: document that -Wbitwise is default
@ 2017-10-17 23:31 Jacob Keller
  2017-10-18 15:35 ` Luc Van Oostenryck
  2017-10-18 19:29 ` Christopher Li
  0 siblings, 2 replies; 3+ messages in thread
From: Jacob Keller @ 2017-10-17 23:31 UTC (permalink / raw)
  To: linux-sparse; +Cc: Jacob Keller

In commit commit 02a886bfa3d9 ("Introduce keyword driven
attribute parsing", 2007-03-08) the -Wbitwise keyword was broken and did
not actually work. Instead, bitwise checks were always enabled.

This was fixed by commit commit 0dfda0d1f0fe ("make -Wbitwise
operational again", 2017-02-18) which allowed -Wbitwise and -Wno-bitwise
to work as expected.

However, since -Wbitwise was enabled for so long, that commit changed
the default of -Wbitwise to be enabled, rather than the documented
"disabled".

Fix the documentation to match, and explain that -Wbitwise is enabled by
default and must be disabled.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 sparse.1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sparse.1 b/sparse.1
index fd4527aa5c95..bdfe14902ba6 100644
--- a/sparse.1
+++ b/sparse.1
@@ -67,8 +67,8 @@ kind of like "NULL" for pointers). So "gfp_t" or the "safe endianness"
 types would be __bitwise: you can only operate on them by doing
 specific operations that know about *that* particular type.
 
-Generally, you want bitwise if you are looking for type safety. Sparse
-does not issue these warnings by default.
+Sparse issues these warnings by default.  To turn them off, use
+\fB\-Wno\-bitwise\fR.
 .
 .TP
 .B \-Wcast\-to\-as
-- 
2.14.1.436.g33e61a4f0239


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

* Re: [PATCH] sparse: document that -Wbitwise is default
  2017-10-17 23:31 [PATCH] sparse: document that -Wbitwise is default Jacob Keller
@ 2017-10-18 15:35 ` Luc Van Oostenryck
  2017-10-18 19:29 ` Christopher Li
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2017-10-18 15:35 UTC (permalink / raw)
  To: Jacob Keller; +Cc: linux-sparse

On Tue, Oct 17, 2017 at 04:31:36PM -0700, Jacob Keller wrote:
> Fix the documentation to match, and explain that -Wbitwise is enabled by
> default and must be disabled.

Thanks for noticing this (and for the patch, of course).

Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

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

* Re: [PATCH] sparse: document that -Wbitwise is default
  2017-10-17 23:31 [PATCH] sparse: document that -Wbitwise is default Jacob Keller
  2017-10-18 15:35 ` Luc Van Oostenryck
@ 2017-10-18 19:29 ` Christopher Li
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Li @ 2017-10-18 19:29 UTC (permalink / raw)
  To: Jacob Keller; +Cc: Linux-Sparse

On Tue, Oct 17, 2017 at 4:31 PM, Jacob Keller <jacob.e.keller@intel.com> wrote:
> In commit commit 02a886bfa3d9 ("Introduce keyword driven
> attribute parsing", 2007-03-08) the -Wbitwise keyword was broken and did
> not actually work. Instead, bitwise checks were always enabled.
>
> This was fixed by commit commit 0dfda0d1f0fe ("make -Wbitwise
> operational again", 2017-02-18) which allowed -Wbitwise and -Wno-bitwise
> to work as expected.
>
> However, since -Wbitwise was enabled for so long, that commit changed
> the default of -Wbitwise to be enabled, rather than the documented
> "disabled".
>
> Fix the documentation to match, and explain that -Wbitwise is enabled by
> default and must be disabled.

Thanks. Will apply.

Chris

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

end of thread, other threads:[~2017-10-18 19:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 23:31 [PATCH] sparse: document that -Wbitwise is default Jacob Keller
2017-10-18 15:35 ` Luc Van Oostenryck
2017-10-18 19:29 ` Christopher Li

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