I´m reworking some example code to fit my project (and gcc).
Once again I stumbled over the different possibilities of variable definition. The avr-libc reference manual states the following typedefs for stdint.h:
Exact-width integer types Integer types having exactly the specified width typedef signed char int8_t typedef unsigned char uint8_t typedef signed int int16_t typedef unsigned int uint16_t [...]
This means that using a definition like:
is essentially the same as:
signed char some_var;
How does gcc handle the definition if the "signed" is left out? Does such a definition default to "signed" or is it safer to use always signed/unsigned definitions?
What´s more is that I´m puzzled because I always believed "char" and "int" to be of the same size in avr-gcc (but I can´t tell you how that idea settled in my mind).