for Linux source compatibility.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/libc/string/mempcpy.c | ||
---|---|---|
38 ↗ | (On Diff #92190) | Shouldn't the restrict qualifier be used in the definition as well? |
lib/libc/string/mempcpy.c | ||
---|---|---|
38 ↗ | (On Diff #92190) | I always thought that not. I was not able to find an answer in the standard from the cursory look, and think that it is not worth the time. |
lib/libc/string/mempcpy.c | ||
---|---|---|
38 ↗ | (On Diff #92190) | I am not sure either. The diff now uses __restrict in the wmempcpy() definition but not in the mempcpy() definition. |
lib/libc/string/mempcpy.c | ||
---|---|---|
38 ↗ | (On Diff #92190) | Oh, I think that adding __restrict to mempcpy is a mistake. Look at the man page text for memcpy(3) about overlapping. On the other hand, memcpy() does has restrict on args. |
lib/libc/string/mempcpy.c | ||
---|---|---|
38 ↗ | (On Diff #92190) | Indeed, though the memcpy() definition in bcopy.c does not use restrict. |