Unomitted frame pointers
jlh
jlh@gmx.ch
Fri Dec 10 16:05:00 GMT 2004
> Off-topic, but the hello.c program does:
> write(2, "Hello World!\n\0", 16);
> The string length is 15, not 16.
15 is what gets allocated for storing the string (counting
the additional \0 that always gets appened to string constants).
But neither the explicit nor the implicit \0 should be printed
to the console, so the call should definitely read:
write(2, "Hello World!\n", 13);
jlh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20041210/2f3acb4a/attachment.sig>
More information about the Gcc
mailing list