Are there any 8051 C++ compilers ?

Hi,

I just need to get my facts straight. I have been given a spec, where the use of C++ and a '51 core MCU is mandatory. AFAIC a C++ compiler for the 51 does not exist.

Regards Anton Erasmus

Reply to
Anton Erasmus
Loading thread data ...

Hello Anton,

I've never used it, just found the link with Google, but take a look at

formatting link
Regards, johannes

Reply to
johannes m.r.

Anton Erasmus wrote in news: snipped-for-privacy@4ax.com:

Silly requirement but C++ does exist (in some form, e.g. EC++):

formatting link

and maybe

formatting link

--
- Mark ->
--
Reply to
Mark A. Odell

formatting link

Never tried it, can't say how good it is. Good luck (you'll probably need it...)

Regards,

-=Dave

--
Change is inevitable, progress is not.
Reply to
Dave Hansen

This appears to be a C++ to C preprocessor. Information is sketchy but there are downloadable demos. They do a version integrated with keil tools. The demo of their standalone product uses SDCC.

I was going to say I wondered why they bothered considering how awful C++ compiled for a 51 must look but then tweaking a preprocessor for a particular backend compiler isn't that much work.

Reply to
nospam

rumor has it that it uses too many resources. C++ in an 8052 is probably not the best idea. look aT

formatting link

Reply to
Neil Kurzman

In article , Anton Erasmus writes

DON'T DO IT

The only C++ compiler system for the 8051 AFAIK is the Ceibo one that Keil can supply. However it is not very efficient and I can't see any reason for using it.

You C++ will be so restricted that is will be virtually C or it will be a VERY small program.

Why is C++ Mandatory? This spec is from some one who clearly does not understand what they are asking for.

BTW which 51 is it?

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

It does (see the other replies), but that's not really the answer to the problem. That combination is like asking an architect to build a family home with a fully service-qualified road inside to go from the couch to the toilet in an 40-ton 18-wheeler. It's completely crazy idea.

I'd interpret that spec as someone's sick try at a prank.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

It does (see the other replies), but that's not really the answer to the problem. That combination is like asking an architect to build a family home with a fully service-qualified road inside to go from the couch to the toilet in a 40-ton 18-wheeler. It's a completely crazy idea.

I'd interpret that spec as someone's sick try at a prank.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

Poor analogy IMO. They specified a language which will run inefficiently on the specified hardware. People run interpreted BASIC on 51s is that completely crazy?

It is just difficult to see how the inefficiency could be justified by the limited benefits of C++ compared to C on the kind of system that will fit on a 51.

Reply to
nospam

There is at least the possibility that those who specified the system did not understand that C was a different language from C++. You often see C/C++ referred to as if it were a single language and I seem to recall seeing C++ referred to in a context where the language being discussed was C.

Depending on your relationship with the people involved it may be worth discussing this (although I suspect you would already have done that if you expected it to be at all fruitful). You might even be able to sell them on C as a subset of C++.

Robert

Reply to
R Adsett

on

You did not catch the point: a minimal C++ program (doing nothing yet) needs more resources then is sensible to take from a 8051.

Of course, if you're going to use C++ as weird C without using any objects, you can get by with an 8051, but what is the advantage over plain C?

Like Cato the elder said: 'Ceterum censeo, Carthaginem esse delendam' (By the way, Karthago ought to be destryed). Even risking a repeat: DO NOT ATTEMPT IT.

The first C++ compilers converted the code into straight C which was then compiled to the target object code. The converted C is plain awful.

Tauno Voipio tauno voipio (at) iki fi

Reply to
Tauno Voipio

Sounds more like some junior, pointy haired middle management type whose golfing buddy told him C++ was hip.

Bob

--
"Just machines that make big decisions
 programmed by fellas with compassion and vision."
 Click to see the full signature
Reply to
Bob Stephens

If you don't use any C++ features, it should be possible to generate code that is no larger or slower than plain C. What specific C++ features does the spec writer have in mind?

Bob

Reply to
Bob

... snip ...

Which it isn't. So long as you realize that yourself before putting on the spin.

--
"I'm a war president.  I make decisions here in the Oval Office
 in foreign policy matters with war on my mind." -         Bush.
 Click to see the full signature
Reply to
CBFalconer

Okay, I'll bite. What features or language constructs are in C that are not in C++? I always thought that C++ was a superset of C and curious about why it isn't.

TTaylor

Reply to
Tom Taylor

C has not been a sub set of C++ for some years. Parts of C++ use the same syntax for different things.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

In article , Bob writes

You would thinks so but this is not the case.... The C++ compiler that is available for the 8051 is nothing like as efficient as the C compilers for the 51... SO even if you use almost straight C on the C+ compiler the code will be much biger than the same C on a good C51 C compiler.

Now there is a good question that should be closely followed by "why?" ie why does he *NEED* those features.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

Many aspects. Just to name a few:

IN 'C' IN C++ '0' integer const char const // syntax error comment to EOL unless C99 standard p = malloc(N * sizeof *p) Best construct requires a cast int new; integer named new syntax error sizeof('1') == sizeof(int) == 1

Reply to
CBFalconer

goofy sig. IS it absolutely necessary in a programming NG to wear your politics on your sleeve? Not to mention a sig that is nearly as long as the posts...

Reply to
nappy

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.