This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: is the c code in gcc comiled sequentially???
- From: John Love-Jensen <eljay at adobe dot com>
- To: enggakshat <enggakshat at yahoo dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 15 Nov 2006 09:37:54 -0600
- Subject: Re: is the c code in gcc comiled sequentially???
Hi Akshat,
> -i really dont have a clue to what tool chain driver means.sorry for that.
A "tool chain driver" is a program that executes other programs, in the
proper order, to achieve a particular goal.
For example, the gcc tool chain driver runs the preprocessor, then takes the
output from the preprocessor and runs that output through the compiler, then
takes that output from the compiler and runs it through the assembler, then
takes that output from the assembler and runs it through the linker, to
produce the executable.
> for the following simple code i thought its obvious that 'hello' is printed
> but that doesnt happen.
> as far as i knew the code is executed sequentially.
You have not flushed your buffer yet, so the "Hello" is languishing in the
buffer.
Add a ...
cout.flush();
... statement to flush the buffer, before entering the loop.
HTH,
--Eljay