Re: Writing a compiler

Marco van de Voort <marcov@stack.nl>
Sun, 2 Nov 2008 16:34:44 +0000 (UTC)

          From comp.compilers

Related articles
[6 earlier articles]
Re: Writing a compiler Ibeam2000@gmail.com (Nick) (2008-10-26)
Re: Writing a compiler rajaram.officemails@gmail.com (RR) (2008-10-26)
Re: Writing a compiler andresjriofrio@gmail.com (andresj) (2008-10-29)
Re: Writing a compiler kamalpr@hp.com (kamal) (2008-10-29)
Re: Writing a compiler tony@my.net (Tony) (2008-10-31)
Re: Writing a compiler lkrupp@pssw.nospam.com.invalid (Louis Krupp) (2008-11-01)
Re: Writing a compiler marcov@stack.nl (Marco van de Voort) (2008-11-02)
Re: Writing a compiler chris.dollin@hp.com (Chris Dollin) (2008-11-03)
Re: Writing a compiler lkrupp@pssw.com (Louis Krupp) (2008-11-03)
Re: Writing a compiler alexc@TheWorld.com (Alex Colvin) (2008-11-03)
Re: compiling C++ to C, was writing a compiler marcov@stack.nl (Marco van de Voort) (2008-11-04)
Re: compiling C++ to C, was writing a compiler alexc@TheWorld.com (Alex Colvin) (2008-11-04)
Re: Writing a compiler gneuner2@comcast.net (George Neuner) (2008-11-04)
[6 later articles]
| List of all articles for this month |

From: Marco van de Voort <marcov@stack.nl>
Newsgroups: comp.compilers
Date: Sun, 2 Nov 2008 16:34:44 +0000 (UTC)
Organization: Stack Usenet News Service
References: 08-10-037 08-10-046 08-10-047 08-11-003 08-11-008
Keywords: C++
Posted-Date: 02 Nov 2008 17:55:12 EST

On 2008-11-01, Louis Krupp <lkrupp@pssw.nospam.com.invalid> wrote:
>> [cfront was a prototype, and it's a miracle it worked as well as it did.
>> If you want to see generated code, either get the Comeau compiler, or look
>> at the assembler output from something like GCC. -John]
>
> Look up "name mangling." It's as ugly as it sounds, but as far as I
> know, it's how all C++ compilers manage scoping and overloading.
>
> I see no reason why cfront couldn't implement all of C++;
> theoretically, there's no difference between generating C or assembler
> code.


This is not true if e.g. all chars that can be used in C identifiers are
also valid chars in C++. In assembler, usually a lot more special chars ($,@
often) can be used to separate the parts in a mangled name.



Post a followup to this message

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