Unomitted frame pointers

Nathan Sidwell nathan@codesourcery.com
Sat Dec 11 15:40:00 GMT 2004


Sam Lauber wrote:
> We would end up with two copies of the string. #defines are preprocessed, so it would expand to the second thing. The _safe_ way to do it is
Why do you think you'd get two copies of the string?

> 
> char str = "Hello World!\n";
type mismatch error

> write(2, str, strlen(str)-1);
off by one error

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc mailing list