tbaederr wrote:
`test/Sema/init.c` has this test:
```c
typedef void (* fp)(void);
void foo(void);
fp a[(short int)1] = { foo };
__UINTPTR_TYPE__ ptrasintadd2 = (__UINTPTR_TYPE__)&a + 4;
```
where the initializer (`(__UINTPTR_TYPE__)&a + 4`) goes through
`evaluatAsRValue()`, and needs to succeed. That means an address integral can't
_just_ be an address, it needs to be an address and an offset. To make this
worse, arithmetic on that result needs to work as well, i.e.`(
(__UINTPTR_TYPE__)&a + 4) + 10` also needs to work and return the correct
lvalue offset of 14.
https://github.com/llvm/llvm-project/pull/169769
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits