On Sat, Apr 07, 2018 at 12:00:17PM -1000, Joey Pabalinas wrote: > Clean up the grammar/capitalization of the -Wsizeof-bool sections and > italicize the size (1) so that it is consistent with the surrounding > text. Thanks. It's globally good to me but I have a few nitpicks. > diff --git a/evaluate.c b/evaluate.c > index f828da37df8e686623..de85feaea696ba5358 100644 > --- a/evaluate.c > +++ b/evaluate.c > @@ -2200,7 +2200,7 @@ static struct symbol *evaluate_sizeof(struct expression *expr) > > if (size == 1 && is_bool_type(type)) { > if (Wsizeof_bool) > - warning(expr->pos, "expression using sizeof bool"); > + warning(expr->pos, "expression using sizeof(bool)"); Both are equally correct so it looks to me as an unneeded change but I don't really mind. However, I had to adapt the corresponding test like this: diff --git a/validation/sizeof-bool.c b/validation/sizeof-bool.c index 05e76a44e..337c3f996 100644 --- a/validation/sizeof-bool.c +++ b/validation/sizeof-bool.c @@ -8,6 +8,6 @@ static int a(void) * number of bytes * check-command: sparse -Wsizeof-bool $file * check-error-start -sizeof-bool.c:3:16: warning: expression using sizeof bool +sizeof-bool.c:3:16: warning: expression using sizeof(bool) * check-error-end */ > diff --git a/sparse.1 b/sparse.1 > index 4379406999c94b806e..598ba396571f123e7d 100644 > --- a/sparse.1 > +++ b/sparse.1 > @@ -346,9 +346,10 @@ Sparse does not issue these warnings by default. > . > .TP > .B \-Wsizeof-bool > -Warn when checking the sizeof a _Bool. > +Warn when applying \fBsizeof\fR to a _Bool type. > > -C99 does not specify the sizeof a _Bool. gcc uses 1. > +C99 does not specify the \fBsizeof(_Bool)\fR. By default, GCC assigns _Bool a > +size of \fI1\fR. I don't find 'the sizeof(_Bool)' very grammatical. What about a simple: "the size of a _Bool" (or "the size of the _Bool type")? I don't think it's possible to change the size of _Bool, so I would remove the "By default" here above and just leave "GCC assigns ..." or more simply "GCC uses a size of 1 for the type _Bool"? Cheers, -- Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html