This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libc-alpha] Re: [libc-alpha] Re: [open-source] Re: Wish for2002


On Wed, 9 Jan 2002, Andreas Schwab wrote:

> You cannot find it because it is undefined, by the virtue of the C
> standard, which has explicit wording to make it undefined (restrict
> pointers).  Does the BSD manpage make the pointer parameters of strlcat
> restricted pointers?

The explicit wording is not the use of "restrict" - which is irrelevant
unless it also occurs on the definition of the function, and then only
relevant in conjunction with the rest of the text of the function which
says what bytes are accessed through which argument - but an actual
statement that "If copying takes place between objects that overlap, the
behavior is undefined." (7.21.2.1#2 for memcpy, 7.21.2.3#2 for strcpy,
7.21.2.4#2 for strncpy).  (It does not explicitly say what the objects
that must not overlap are - but presumably one is the bytes that may be
read from one string, and the other is the bytes that are written to the
other string.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]