[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avr-gcc-12.1.0-x64-windows new warnings ?
From: |
Thilo Schulz |
Subject: |
Re: avr-gcc-12.1.0-x64-windows new warnings ? |
Date: |
Mon, 24 Apr 2023 23:12:40 +0200 |
Hi,
> Hmm isnt that loading 2bytes into one ?
well yes, ordinarily this would be the case. But I am specifically referring
to programming close to hardware, where a register with offset 0 from the
peripheral base address is configured from a linker script, and system headers
defining (sub-)registers of that peripheral in terms of this base register
with an array subscript.
The compiler has no idea how large the address space actually is, as the
declaration suggests the "array" is only a single byte long. Hence the
warning.
However, given that the warning complains at array offset "0", I just realised
that the warning underlying the original mail:
seems to be due to gcc having become stricter / buggy. As Georg-Johann wrote:
>https://gcc.gnu.org/PR105523
Very interesting. I've had problems with this type of warning since gcc 9.2.0,
though not necessarily on avr-gcc.
--
Beste Grüße
Thilo Schulz