Compiling the Arduino targets with GCC 12 fails with the following:
error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
Apply the workaround from the bug discussion to fix it.
Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Update .clang-format for LLVM 14.0, available on Ubuntu 22.04.
There is still plenty that clang-format sucks at or does wrong, so
either add some more blocks to disable it, or just put up with it.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Replace bare int types with stdint types. This was done with:
grep -rwl 'int' src/ | xargs sed -i 's/\<int\>/int16_t/g'
grep -rwl 'unsigned long' src/ | xargs sed -i 's/\<unsigned long\>/uint32_t/g'
grep -rwl 'unsigned char' src/ | xargs sed -i 's/\<unsigned char\>/uint8_t/g'
Then reverted for *main(), putchar(), and getchar().
The Arduino declarations for parallel_main() were also corrected to
match their definitions.
SDCC does *not* generate the same code in all instances, due to `int`
being treated different than `short int`.
Signed-off-by: Tim Crawford <tcrawford@system76.com>