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


On Wednesday, October 23, 2002, at 04:42 AM, marc.poulhies@epfl.ch wrote:
I'm a student in computer sciences and i'm learning how compilers work. This
morning a student told that gcc, in fact, always traducts other languages to C,
as it was first designed for C and so can handle it very well.
I was suprised, but before telling him waht i thought, i wanted to have
something to show him (in the case he's wrong).
My readings gave me an answer about c++, but what about other languages?
traducts isn't a word in my language, so I might not understand your question.

What answer did your readings give you for C++? If they say that C++ is translated into C, well that doesn't describe the GNU compiler. g++ is a native C++ to assembly language compiler, just a GNU C is a C to assembly language compiler. GNU C was written first, and GNU C++ came after it. All the other languages that gcc supports are also compiled from their source language into trees, and from there into rtl and from there into assembly, as documented in the gcc manual:

http://gcc.gnu.org/onlinedocs/gccint/Passes.html#Passes

If you've not read it, there is enough detail in there to keep you warm on a cold winter night, should you print it out first:

http://gcc.gnu.org/onlinedocs/gccint/index.html

Hope this helps.


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