diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2025-07-28 21:44:06 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2025-07-28 22:06:08 +0200 |
commit | 089faf54fa96565784ebdd8dfcf9c350c4c3bee5 (patch) | |
tree | 0be62cb02c2027873821f62bcec68dbb859e3912 /gcc/go | |
parent | a51bf9e10182cf7ac858db0ea6c5cb11b4f12377 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
Converting from generic AS to __flashx used the same rule like
for __memx, which tags RAM (generic AS) locations by setting bit 23.
The justification was that generic isn't a subset of __flashx, though
that lead to surprises with code like const __flashx *x = NULL.
The natural thing to do is to just load 0x000000 in that case,
so that the null pointer works in __flashx as expected.
Apart from that, converting NULL to __flashx (or __flash) no more
raises a -Waddr-space-convert diagnostic.
gcc/
PR target/121277
* config/avr/avr.cc (avr_addr_space_convert): When converting
from generic AS to __flashx, don't set bit 23.
(avr_convert_to_type): Don't -Waddr-space-convert when NULL
is converted to __flashx or to __flash.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions