Related articles |
---|
[10 earlier articles] |
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: Writing a compiler gneuner2@comcast.net (George Neuner) (2008-11-04) |
Re: Writing a compiler gneuner2@comcast.net (George Neuner) (2008-11-04) |
Re: Writing a compiler marcov@stack.nl (Marco van de Voort) (2008-11-06) |
Re: Writing a compiler james.harris.1@googlemail.com (James Harris) (2008-11-09) |
Re: Writing a compiler james.harris.1@googlemail.com (James Harris) (2008-11-09) |
From: | George Neuner <gneuner2@comcast.net> |
Newsgroups: | comp.compilers |
Date: | Tue, 04 Nov 2008 22:17:22 -0500 |
Organization: | A noiseless patient Spider |
References: | 08-10-037 08-10-046 08-10-047 08-11-003 08-11-008 08-11-009 |
Keywords: | C++ |
Posted-Date: | 05 Nov 2008 18:48:34 EST |
On Sun, 2 Nov 2008 16:34:44 +0000 (UTC), Marco van de Voort
<marcov@stack.nl> wrote:
>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.
That doesn't matter. The standard does not specify how to mangle
names and, in fact, nearly every compiler does it differently. As
long as the C compiler can handle long identifiers, the names can be
mangled by any suitable convention.
George
Return to the
comp.compilers page.
Search the
comp.compilers archives again.