This is the mail archive of the gcc-help@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: 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


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