https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106939
--- Comment #6 from Arseny Vakhrushev <neoxic at icloud dot com> --- Lots of thanks again, Andrew! ---------------------------------------------- #include <string.h> #include <stdint.h> extern char _dst[], _src[], _end[]; int main(void) { memcpy(_dst, _src, _end - _src); uint32_t *dst = (uint32_t *)_dst; uint32_t *src = (uint32_t *)_src; uint32_t *end = (uint32_t *)_end; while (src < end) *dst++ = *src++; return 0; } ----------------------------------------------- Well, I hope I'm not doing anything terribly wrong, but the above works very nice for me, looks clean, involves pointer arithmetics and doesn't produce any warnings. I also can't really understand how it is possible for pointer comparison to be undefined. If you could point me to the corresponding C standard section, I would really appreciate that! Thanks a lot again!