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: gcc at gcc dot gnu dot org
- Date: Sat, 11 Dec 2004 16:42:14 +0000
- Subject: Re: Unomitted frame pointers
- Organization: Codesourcery LLC
- References: <20041211162555.C0BE723CE8@ws5-3.us4.outblaze.com>
Sam Lauber wrote:
Do you know about macro expansion? CPP would make it seperate strings. So there would be (simplified);
Have you actually TRIED this ?
int main(void)
{
char str1 = "Hello World!\n";
char str2 = "Hello World!\n";
int str_len = 0;
while (*str1++ != "\0")
str_len++;
write(2, str2, str_len);
}
This program won't compile. How do you know what assembly you'd get?
I think you're hypothesizing with no knowledge of the internals of the compiler,
or actual experimentation.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk