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

wrenger at sra dot uni-hannover.de gcc-bugzilla@gcc.gnu.org
Thu Aug 4 15:38:02 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106526

--- Comment #3 from Lars Wrenger <wrenger at sra dot uni-hannover.de> ---
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 an array (even if *x == x[0]).


More information about the Gcc-bugs mailing list