Arkadi, I am not compiler developper but I learnt it from documentation and books
http://www.acm.uiuc.edu/sigmil/RevEng/ch02.html http://www.network-theory.co.uk/docs/gccintro/gccintro_82.html (please follow "next >>>" link) http://codingfreak.blogspot.com/2008/02/compilation-process-in-gcc.html http://www.csse.monash.edu.au/courseware/cse2302/2005/labs/lab1/gcc.html http://www.cs.cmu.edu/~mjs/123/lectures/Feb-25/makefiles.pdf http://gcc.gnu.org/onlinedocs/gccint/Passes.html#Passes Ok, you might be right in regard Java source code and bytecode. Well, I am not completely sure and it might be that you right that "C" is not "RTL" any more as it was years ago. Now it looks like "Language Source Code" -> AST -> RTL -> RTL optimization -> Assembly -> Linker -> Binary code. http://gcc.gnu.org/wiki/StructureOfGCC Sorry for some misleading information, I read documentation about internals of GCC compiler a few years (probably 6 years ago) and quite big changes happened since then. NOTE: I am not teaching but installing/configuring/suppoting IT infrastructure. Andrey Arkadi Shishlov wrote: >Andrey Vlassov wrote: > > >>If you ask them what really happens when they click "Compile" or "Run" >>you will get wrong answer. >> >> > >Half of what you wrote about compilation sequence is obviously wrong. If you >ever going to teach people about the topic, please first make clear how it >really works for yourself. > > > >>For most IDE the sequence is next: >> >>1. save file >>2. regenerate makefile (if it required) >>3. run "make" (or other equivalent) >>4. "make" runs compiler >>5. compiler takes for example C++ code (.cpp) >>6. compiler runs preprocessor (.cpp) >>7. compiler converts C++ into C (.c) >>8. compiler runs C optimizer (.c) >>9. compiler converts C into ASM (.asm) >>10. compiler runs ASM optimizer (.asm) >>11. compiler runs ASM compiler (.obj) >>12. compiler runs linker (.exe/.com/.bin/.ihx/.out) >> >>But system can get even more complicated (GNU Compiler Collection) >> >>C++ -> C >>Objective-C -> C >>Pascal -> C >>Ada -> C >>Java -> C >>Fortran -> C >>C -> Assembly >>Assembly -> binary code >> >> > > >------------------------------------------------------------------------- >This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >Build the coolest Linux based applications with Moblin SDK & win great prizes >Grand prize is a trip for two to an Open Source event anywhere in the world >http://moblin-contest.org/redirect.php?banner_id=100&url=/ >_______________________________________________ >Sdcc-user mailing list >Sdcc-user@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/sdcc-user > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user