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

--- Comment #45 from Tim Ruffing <public at timruffing dot de> ---
Ha, I didn't want to move to discussion about restrict, but as a final remark:
The formal semantics of restrict are not easy to parse and understand (see
https://www.iso-9899.info/n3047.html#6.7.3.1 ). But just the sentence "If L is
used to access the value of the object X that it designates, and X is also
modified (by any means), then the following requirements apply ..." should make
clear that no requirement is made at all if no object is modified. And this is
clearly the case for `if (src==dest) return;`

Besides that, I agree with what Ralf said:
> I'm not a compiler dev nor a libc dev, I just want to make sure that my 
> compiler and my libc use the same contract when talking to each other -- but 
> I hope someone who is a compiler dev or a libc dev can go and actually test 
> these hypotheses, rather than just speculating about it as has been happening 
> so far.

Reply via email to