Re: [cc65] Arrays of structs

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-08-16 20:49:42
On Tue, Aug 16, 2005 at 06:09:20PM +0200, Groepaz wrote:
> ok, another great excuse for me to not use them :=)

Well, the types aren't as useless as they seem to be. Note the last sentence:

  "However, if an implementation provides integer types with widths of 8, 16,
  32, or 64 bits, it shall define the corresponding typedef names."

So, *if* the implementation has an unsigned integer type with 8 bits, it must
supply an uint8_t type. If you're using this uint8_t type and your software
doesn't compile, this means that there is no such type and your program won't
run anyway. Which in turn means that one should only use uint8_t if it's an
absolute requirement to have a datatype with exactly 8 bits. Otherwise it's
better to use uint_least8_t, which has at least 8 bits and is a required type.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Aug 16 20:49:55 2005

This archive was generated by hypermail 2.1.8 : 2005-08-16 20:49:59 CEST