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

2022-09-23 Thread neoxic at icloud dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 --- Comment #8 from Arseny Vakhrushev --- 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

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

2022-09-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

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

2022-09-14 Thread neoxic at icloud dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 --- Comment #6 from Arseny Vakhrushev --- Lots of thanks again, Andrew! -- #include #include extern char _dst[], _src[], _end[]; int main(void) { memcpy(_dst, _src, _end - _src);

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

2022-09-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 --- Comment #5 from Andrew Pinski --- (In reply to Arseny Vakhrushev from comment #4) > Thanks a lot, Andrew! Totally my bad. Well, comparison seems to work too: > > extern char _src[], _dst[], _end[]; // Defined by the linker > int main(void)

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

2022-09-13 Thread neoxic at icloud dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 --- Comment #4 from Arseny Vakhrushev --- Thanks a lot, Andrew! Totally my bad. Well, comparison seems to work too: extern char _src[], _dst[], _end[]; // Defined by the linker int main(void) { char *src = &_src[0]; char *dst =

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

2022-09-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 Andrew Pinski changed: What|Removed |Added Resolution|DUPLICATE |INVALID --- Comment #3 from Andrew

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

2022-09-13 Thread neoxic at icloud dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 --- Comment #2 from Arseny Vakhrushev --- Thanks for the quick reply! I've read the aforementioned comments, but can't get to see any similarities. May I ask you to recap what needs to be done in plain and simple words or direct me to the

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

2022-09-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE