Re: Writing a C++ compiler in C++

Hans-Peter Diettrich <DrDiettrich1@aol.com>
Tue, 28 Oct 2008 17:39:36 +0100

          From comp.compilers

Related articles
Writing a C++ compiler in C++ for-usenet-5c@alicewho.com (Adem) (2008-10-27)
Re: Writing a C++ compiler in C++ DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-10-28)
Re: Writing a C++ compiler in C++ echristo@gmail.com (Eric Christopher) (2008-10-28)
Re: Writing a C++ compiler in C++ cfc@shell01.TheWorld.com (Chris F Clark) (2008-10-28)
Re: Writing a C++ compiler in C++ marcov@stack.nl (Marco van de Voort) (2008-10-30)
Re: Writing a C++ compiler in C++ DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-10-31)
Re: Writing a C++ compiler in C++ marcov@stack.nl (Marco van de Voort) (2008-11-01)
| List of all articles for this month |
From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: Tue, 28 Oct 2008 17:39:36 +0100
Organization: Compilers Central
References: 08-10-049
Keywords: C++, practice
Posted-Date: 29 Oct 2008 19:18:40 EDT

Adem schrieb:
> Any projects out there which aim to write a real or experimental
> C++ compiler or interpreter using the C++ language itself?


Most C++ compilers are based on C, because it's hard enough to make C
programs run on multiple platforms. Using C++ will increase that
incompatibility again.


AFAIK gcc will be compiled three times, until the compiler is usable on
a different platform. The bootstrap process uses the C compiler of the
platform for the first compilation, then the created compiler to compile
itself in a restricted version, and that compiler to produce the final
version. Unless you restrict your project to compile with one specific
C++ compiler, you'll have to bootstrap your compiler in a similar way.


DoDi



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.