benshi001 added a comment.
In D96853#2659266 <https://reviews.llvm.org/D96853#2659266>, @Anastasia wrote:
> Btw is any pointer conversion between address space 1 and the default address
> space allowed? I.e. is the following code valid:
>
> __flash static const int var1[] = {111, 222, 333};
> void foo(int*);
> ....
> foo(var1);
>
> or
>
> __flash static const int var1[] = {111, 222, 333};
> void foo(int*);
> ....
> foo((int*)var1);
>
> ?
No. clang denied with `error: passing 'const __attribute__((address_space(1)))
int *' to parameter of type 'const int *' changes address space of pointer`
while avr-gcc accepted it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96853/new/
https://reviews.llvm.org/D96853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits