Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do not use the sizeof() operator
#4
The C90 definition of a byte is essentially identical to the C99 one. The notes in C99 are part of the clause in C90.
I see not clause in C99 that defines a char as 8 bits. Do you have a clause reference number please?
The CHAR_BIT macro defined in defines how many bits is a char in both C90 and C99.
CHAR_BIT is required to by AT LEAST 8 in C90 and C99 so 7 bits in a byte is not allowed whereas 16 is.

I would say that Rule 6.3 should cover this issue?
Rules 6.1 and 6.2 discuss char so perhaps a note about the size of a byte/char could be included there?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)