|
|
|
|
|
by nephanth
548 days ago
|
|
I mean, they might not have given thought to that particular corner case, they probably wrote something like > memcpy(void* ptr1, void* ptr2, int n) Copy n bytes from ptr1 to ptr2.
UNDEFINED if ptr1 is NULL or ptr2 is NULL ‐------ It might also have come from a "explicit better than implicit" opinion, as in "it is better to have developers explicitly handle cases where the null pointer is involved |
|
Of course, someone needs to check in the layers of abstraction. The user, programmer, compiler, cpu, architecture.. They chose for the programmer, who like to call themselves "engineers" these days.