Related articles |
---|
[7 earlier articles] |
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: 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) |
[1 later articles] |
From: | Chris Dollin <chris.dollin@hp.com> |
Newsgroups: | comp.compilers |
Date: | Mon, 03 Nov 2008 08:57:02 +0000 |
Organization: | HP Labs |
References: | 08-10-037 08-10-046 08-10-047 08-11-003 08-11-008 08-11-009 |
Keywords: | C++ |
Posted-Date: | 03 Nov 2008 09:17:20 EST |
Marco van de Voort wrote:
> On 2008-11-01, Louis Krupp <lkrupp@pssw.nospam.com.invalid> wrote:
>> 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.
It depends on how long the names in the C code can be, and whether one
want the names in the object code to be the same as the names in the
source code.
One could choose Z as an escape character, and have ZZ mean Z, ZD mean
".", ZC mean ":", ZP mean "$", ZA mean "@", etc. Tough on names with
Z's in them; let's hope there aren't that many.
--
'Don't be afraid: /Electra City/
there will be minimal destruction.' - Panic Room
Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England
Return to the
comp.compilers page.
Search the
comp.compilers archives again.