balazske wrote:

With the current version I have the following observations:

- There is a warning for `(&x + 1) - &x` and `(&x - 1) - &x`. Should this be 
fixed?
- The code `(int *)((char *)(&a[4]) + sizeof(int)) - &a[4]` produces no warning 
but `(int *)((char *)(&a[4]) + 1) - &a[4]` produces warning. For 2-dimensional 
arrays there is warning for all of these cases (lines 44-47 in the test file). 
Is this possible to fix (to get warning in all cases), or no warning is needed 
here?

https://github.com/llvm/llvm-project/pull/93676
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to