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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment
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);
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)
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 =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939
Andrew Pinski changed:
What|Removed |Added
Resolution|DUPLICATE |INVALID
--- Comment #3 from Andrew
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |DUPLICATE