Re: avr-gcc-12.1.0-x64-windows new warnings ?
Thilo Schulz <[email protected]> Mon, 24 Apr 2023 23:12:40 +0200
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <5912620.oN7yBYAkkg@roady> |
Hi, > Hmm isnt that loading 2bytes into one ? well yes, ordinarily this would be the case. But I am specifically referrin= g=20 to programming close to hardware, where a register with offset 0 from the=20 peripheral base address is configured from a linker script, and system head= ers=20 defining (sub-)registers of that peripheral in terms of this base register= =20 with an array subscript. The compiler has no idea how large the address space actually is, as the=20 declaration suggests the "array" is only a single byte long. Hence the=20 warning. However, given that the warning complains at array offset "0", I just reali= sed=20 that the warning underlying the original mail: seems to be due to gcc having become stricter / buggy. As Georg-Johann wrot= e: >https://gcc.gnu.org/PR105523 Very interesting. I've had problems with this type of warning since gcc 9.2= =2E0,=20 though not necessarily on avr-gcc. =2D-=20 Beste Gr=FC=DFe Thilo Schulz