This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unomitted frame pointers
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Sam Lauber <sam124 at operamail dot com>
- Cc: Dave Korn <dave dot korn at artimi dot com>, gcc at gcc dot gnu dot org
- Date: Sat, 11 Dec 2004 15:40:38 +0000
- Subject: Re: Unomitted frame pointers
- Organization: Codesourcery LLC
- References: <20041211024445.57C2E23CE8@ws5-3.us4.outblaze.com>
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