[Bug c/106939] Linker-defined symbols are stained due to 'array subscript is partly outside array bounds' warning

neoxic at icloud dot com gcc-bugzilla@gcc.gnu.org
Sat Sep 24 01:21:32 GMT 2022


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

--- Comment #8 from Arseny Vakhrushev <neoxic at icloud dot com> ---
Thank you, Jakub! I have read that section and can see that the Standard is
just very cautious about the cases it doesn't cover labeling them as "undefined
behaviour". The most likely reason is memory segmentation. Comparing two
pointers that point to different objects located in different memory segments
make no sense. But taking into account that the times of segmented memory are
long gone for the average C programmer, it is save to assume that no additional
action is needed to fool the compiler.


More information about the Gcc-bugs mailing list