home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:13293 comp.std.c:2581
- Newsgroups: comp.lang.c,comp.std.c
- Path: sparky!uunet!usc!rpi!utcsri!geac!r-node!pseudo!mjn
- From: mjn@pseudo.uucp (Murray Nesbitt)
- Subject: Re: strcpy implementation question
- Organization: Private system in Toronto, ON
- Date: Mon, 7 Sep 1992 10:28:36 GMT
- Message-ID: <MJN.92Sep7022836@pseudo.uucp>
- In-Reply-To: karl@ima.isc.com's message of Thu, 3 Sep 1992 20:56:46 GMT
- References: <PINKAS.92Aug24183511@caraway.intel.com>
- <1992Aug26.224904.7671@sneaky.lonestar.org>
- <PINKAS.92Sep2173635@skywalker.intel.com>
- <1992Sep03.205646.11564@ima.isc.com>
- Sender: mjn@pseudo.uucp (Murray Nesbitt)
- Lines: 20
-
-
- karl@ima.isc.com (Karl Heuer) writes:
-
- > #include <stdio.h>
- > char dst[4] = "abc";
- > char src[4] = "";
- > int main(void) {
- > strcpy(dst, src);
- > if (dst[1] != 'b') printf("strcpy() is broken\n");
- > return 0;
- > }
- >
- >The undocumented side effect caused by the proposed "optimization" would have
- >an effect on the execution of this strictly conforming program.
-
- Wouldn't this program need to #include <string.h> (or at least have a
- declaration for strcpy()) for strict conformance?
-
- --
- Murray
-