On 12/25/25 11:33, Matteo Golin wrote:
I wonder if the 8 bit architectures use smaller integer sizes for things
like the timespec structs. I wonder if there are any other parts of NuttX
that would complain during compilation seeing that ostest seems to make the
assumption that tv_nsec is big enough for that operation. I guess its
infrequent that things are tested on 8-bit MCUs now.

As someone who is regularly developing for AVR, do you think it would be a
benefit to have a test suite that is able to run fully on AVR itself? Even
if only a couple tests can be included in an image at once due to flash
size limits?

Most POSIX interfaces use fixed width integer type from stdtpe.h to assure portabilityu in all places where integer width matters. But POSIX will use int or unsigned for small integers whose storage size does not matter.  The ANSII spec guarantees that the size of an integer is at least 16 bits.  Linux and Windows treat an integer as 32 bits.  Standard integer types should be used if a width can be more than that.

The actual width of type int is determined by the compiler and you would have to look at the ABI to determine which size is generated by the compiler.

Reply via email to