[Bug c/106526] array-bounds warning on constant pointer dereferencing

2022-08-04 Thread wrenger at sra dot uni-hannover.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106526 --- Comment #3 from Lars Wrenger --- The array-bounds warning itself is nice. In most cases, it is good if the compiler can find invalid memory accesses. However, the wording of the warning is confusing. Strictly speaking, we are not accessing a

[Bug c/106526] array-bounds warning on constant pointer dereferencing

2022-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106526 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/106526] array-bounds warning on constant pointer dereferencing

2022-08-04 Thread wrenger at sra dot uni-hannover.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106526 --- Comment #1 from Lars Wrenger --- Same on C++: https://godbolt.org/z/7do3zhavf