are arrays allowed in strictly conforming programs?
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Oct 13 01:30:42 AEST 1990
In article <7913 at star.cs.vu.nl> eck at cs.vu.nl (Hans van Eck) writes:
>If an array is accessed beyond the end of *an* object, the behavior is
>undefined. (emphasis mine)
No, of course not. The sentence (in the blanket rules for the <string.h>
function conventions) has no force outside 4.11 in any case, but more
specifically it is part of a larger context that you have dropped. The
larger context is that some of the 4.11 functions could be requested to
operate on nonexistent objects, for example
int src[3], dst[10];
memcpy(dst, src, 10);
Instead of posting a warning in each function's subsection, the
injunction against attempting such abuse is posted in the blanket section.
More information about the Comp.std.c
mailing list