aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostics/state-graphs.cc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2025-07-28 21:44:06 +0200
committerGeorg-Johann Lay <avr@gjlay.de>2025-07-28 22:06:08 +0200
commit089faf54fa96565784ebdd8dfcf9c350c4c3bee5 (patch)
tree0be62cb02c2027873821f62bcec68dbb859e3912 /gcc/diagnostics/state-graphs.cc
parenta51bf9e10182cf7ac858db0ea6c5cb11b4f12377 (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
AVR: target/121277 - Don't load 0x800000 with const __flashx *x = NULL.HEADtrunkmaster
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/diagnostics/state-graphs.cc')
0 files changed, 0 insertions, 0 deletions