diff mbox

doc: copy-edit manual/warning text for sizeof(_Bool)

Message ID 20180407220017.qxnx37x2onrgs4wk@gmail.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Joey Pabalinas April 7, 2018, 10 p.m. UTC
Clean up the grammar/capitalization of the -Wsizeof-bool sections and
italicize the size (1) so that it is consistent with the surrounding
text.

CC: Al Viro <viro@ZenIV.linux.org.uk>
CC: Christopher Li <sparse@chrisli.org>
CC: Joey Pabalinas <joeypabalinas@gmail.com>
CC: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox

Patch

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)");
 		size = bits_in_char;
 	}
 
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.
 
 Sparse does not issue these warnings by default.
 .