Re: [patch] AVR: Support strict address space subset relations

Denis Chertykov <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <CADOs=zZCJwKBfMdNmr=SVAPiECh4MXi1YS13CbrdLXwfRAPDYw@mail.gmail.com>
пн, 17 авг. 2026 г. в 17:02, Georg-Johann Lay <[email protected]>:
>
> To date, each named address space is implemented as a subset
> of all the other address spaces, which allows code like
>
>     char read_char (const char *addr, bool in_flash)
>     {
>        return in_flash
>          ? *(const __flash char*) addr  // Read from program memory.
>          : *addr;                       // Read from RAM.
>     }
>
> even though __flash is not a subset of Generic.
>
> This patch introduces new target option -mstrict-addr-space-subsets
> which instructs avr_addr_space_subset_p to implement the address
> space subset relations like they actually are, i.e.
>
>     __memx > __flashx > __flash, __flash1, ..., __flash5
>     __memx > Generic
>
> Ok for trunk?

Ok.

Denis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.