#avr Logs

May 26 2022

#avr Calendar

07:31 AM twnqx: meh. lufa is totally broken with avr-gcc 12
07:41 AM twnqx: actually
07:41 AM twnqx: it's the avr lib that is totally broken with gcc 12
07:41 AM twnqx: pmon.c:73:11: error: array subscript 0 is outside array bounds of ‘volatile uint8_t[0]’ {aka ‘volatile unsigned char[]’} [-Werror=array-bounds]
07:41 AM twnqx: 73 | DDRD &= 0x03;
07:41 AM twnqx: In file included from /usr/avr/include/avr/io.h:99,
09:28 AM rue_mohr: who creates a 0 length array?
09:29 AM rue_mohr: index 0 IS out of range
09:29 AM qu1j0t3: :)
09:29 AM rue_mohr: how long was the array supposed to be?
09:29 AM qu1j0t3: oh believe me it's long long
09:29 AM rue_mohr: if its doing things like making 0 length arrays, yea
09:30 AM qu1j0t3: volatile float yeet[~0];
09:31 AM rue_mohr: what determines the length of the array
09:31 AM rue_mohr: must be a calculated define
12:53 PM twnqx: there is not even an array
12:53 PM twnqx: #define DDRD _SFR_IO8(0x0A)
12:54 PM twnqx: #define _SFR_IO8(io_addr) ((io_addr) + __SFR_OFFSET)
12:54 PM twnqx: #define _SFR_IO8(io_addr) _MMIO_BYTE((io_addr) + __SFR_OFFSET)
12:54 PM twnqx: (one of the two)
12:54 PM twnqx: probably the latter though
12:54 PM twnqx: #define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))
12:55 PM twnqx: yet somehow gcc12 manages to turn that into an array of size 0
02:34 PM specing_ is now known as specing
05:04 PM baltazar: twnqx: I remember getting that with some specific set of flags
05:05 PM baltazar: twnqx: yea, if I remove -flto from my standard set of flags, it complains about the same thing
05:18 PM twnqx: i downgraded to 11 and it's fine
05:27 PM rue_mohr: they love to break gcc