This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Unomitted frame pointers



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

Attachment: signature.asc
Description: OpenPGP digital signature


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