Re: [PATCH] doc: copy-edit manual/warning text for sizeof(_Bool)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 08, 2018 at 08:53:45AM +0200, Luc Van Oostenryck wrote:
> 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:
> 
> -sizeof-bool.c:3:16: warning: expression using sizeof bool
> +sizeof-bool.c:3:16: warning: expression using sizeof(bool)

Hm, giving it a second look over I think for consistencies sake
maybe we should just use "warning: expression using sizeof _Bool"?

Since "bool" it's always a typedef, maybe it's best to just stick
to the type specified in the standard.

> 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")?

But yeah, I do agree it's probably best to nix the parentheses.

> 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"?

Well yes and no. Though it's sort of obscure, the GCC manual does have
a -mone-byte-bool flag, the description of which is:
> > -mone-byte-bool
> >
> >    Override the defaults for "bool" so that "sizeof(bool)==1". By default
> >    "sizeof(bool)" is 4 when compiling for Darwin/PowerPC and 1 when
> >    compiling for Darwin/x86, so this option has no effect on x86.

So I figured since there is _some_ remote possibly of it not being 1
it's marginalty better to word it this way.

Taking note of your suggestions I'm making a V2 now.

-- 
Cheers,
Joey Pabalinas

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux