-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Testcase is attached. Some invocations of stpcpy work, some don't.
- --
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
iQEcBAEBAgAGBQJSXTZoAAoJEOs4Jb6SI2CwN9kIAMWBwG/OIv/v3lSpKkci8ZtV
JeLLhIu9XXABOmHeDT4UJ2CR/+gW4f4ez0f3uGakqpaUBFmrPvMKjjCVhHvoSoBw
HzcUS2mES5pNg9WMKVyiKC18hd3yUts6uq+8w1q86/nLYRHyrTpgFwHea0L9dZRc
Fe1CMJWB42Izra0z4jIBPlnZw4yx2E5NLQeglY4cX1iOrpNCmRcmqSzg7QqtDW8a
lMx64KoumEpTe/aq04Uulg6fe/e6HLpFQ3yfwFDCytVvwPAq2mlsK4Qt7fRi44k1
EH5kHfNhla/CGxn9428Rakh2lUdrgNwm3g4pz2uI3cSfxOa7fHQIn27obKQ4Wgo=
=iPQk
-----END PGP SIGNATURE-----
#include <stdio.h>
//char *stpcpy(char *__restrict s1, const char *__restrict s2);
int
main (int argc, char **argv)
{
char buf[1000];
#if 1
char *p = stpcpy (buf, (const char *) argv[0]); //this doesn't work
printf ("buf = %s, p = %s\n", buf, p);
#elif 0
stpcpy (buf, (const char *) argv[0]); // this works
printf ("buf = %s\n", buf);
#elif 0
char *p = stpcpy (buf, (const char *) "123"); // this works too
printf ("buf = %s, p = %s\n", buf, p);
#endif
return 0;
}
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public