C++ standard compiler comparative study

T

toton

Hi,
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? Most of the big
platforms I know have GCC which well supports C++ standard. But mainly
looking for compilers for small platforms like ARM, XScale, OMAP
processors, and mobile OS's. I am not getting enough imformation which
of the platforms HAVE a C++ compiler/cross compiler and how much they
support C++ standard.
It may not be the proper group to ask the question, but someone might
have a link to some study regarding this. I am not even interested to
old compilers if a new one exists( like I dont bother whether VC6
supports C++ standard or not as GCC, VC7, VC8 exists for the platforms
and more or less well support C++ standard)
I have some C++ code runs well under linux using gcc 4 , which heavily
uses template (STL, Boost) based library and want to know what are the
platforms which will compile the code unmodified! Just want to know
how much portability I can make out of a standard C++!

Thanks
abir
 
M

mlimber

toton said:
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? Most of the big
platforms I know have GCC which well supports C++ standard. But mainly
looking for compilers for small platforms like ARM, XScale, OMAP
processors, and mobile OS's. I am not getting enough imformation which
of the platforms HAVE a C++ compiler/cross compiler and how much they
support C++ standard.
It may not be the proper group to ask the question, but someone might
have a link to some study regarding this. I am not even interested to
old compilers if a new one exists( like I dont bother whether VC6
supports C++ standard or not as GCC, VC7, VC8 exists for the platforms
and more or less well support C++ standard)
I have some C++ code runs well under linux using gcc 4 , which heavily
uses template (STL, Boost) based library and want to know what are the
platforms which will compile the code unmodified! Just want to know
how much portability I can make out of a standard C++!

I have no study, but Texas Instruments has a pretty confomant compiler
(based on the EDG front-end, I think). It doesn't come with the
standard library, but you can use STLport.

Cheers! --M
 
V

Victor Bazarov

toton said:
Hi,
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? [...]

I don't have a link, but google for "standard compliance test C++".

V
 
T

toton

Victor said:
toton said:
Hi,
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? [...]

I don't have a link, but google for "standard compliance test C++".

V
--
Thanks for ther reply. These days I was doing some study on them based
on internet resources available. It looks most of the major platform
has a updated C++ compiler which supports all or most of the features
of C++ standard language features.
So it looks
x86, Linux/ *nix GCC 4.0 or above are good.
x86 Windows , VC7.1 & 8.0 are good.
XScale, StrongARM (Intel but not free! ) & GCC (not sure if they
support PocketPC ot Windows Mobile)
TI OMAP + WindowsMobile => Visual Studio Embedded , but dont support
all C++ features.
But for some processors, like Motorola, TI (C6000, C5000 etc) supports
only C.
Borland Free compiler is not ISO C++ std ... (But C++Builder 2006 may
be, I am not sure)
OpenWatcom isvery close to ISO standard.
Sun (SunStudio) & Apple both has a GCC clone with performance
improvement (?) and extra library support, and are close to C++ ISO
standard (However it looks Apple promotes more ObjectiveC rather than
C++ ! ).
DMC is one more for windows platform.
And Comeau Computing claims they can give a compiler on request for
any platform (esp embedded ) which has atleast a C compiler to compile
its source code! The claim may be perfectly valid, as they use the same
frontend parser and some IR (Just like GCC! ) , and it is very easy to
have a portable C compiler.
Still, there are a large number of embedded processors and
microcontrollers which either doesn't have a C++ compiler or have a
non-standard C++ compiler ,most of them will support C (and I know why!
given a weeks time, I can write a C compiler for a platform which is
more than a toy! but can't for C++ where the parser and language
construct is extremely complex! ) .
Thanks to both of you for the replies. Hope somebody will put a network
resource of all available platforms with C++ compiler and how much they
recognize C++ standard.
 
G

Greg Comeau

toton said:
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? [...]

But for some processors, like Motorola, TI (C6000, C5000 etc) supports
only C.

But: :}
And Comeau Computing claims they can give a compiler on request for
any platform (esp embedded ) which has atleast a C compiler to compile
its source code! The claim may be perfectly valid, as they use the same
frontend parser and some IR (Just like GCC! ) , and it is very easy to
have a portable C compiler.

It's not easy, but there is at least often a fighting chance :)
Still, there are a large number of embedded processors and
microcontrollers which either doesn't have a C++ compiler or have a
non-standard C++ compiler ,most of them will support C

But see above again :)
(and I know why!
given a weeks time, I can write a C compiler for a platform which is
more than a toy! but can't for C++ where the parser and language
construct is extremely complex! ) .

IMO a toy C compiler cannot be a C compiler 8}
A C compiler is a few man years of work.
 
T

toton

Greg said:
toton wrote:
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? [...]

But for some processors, like Motorola, TI (C6000, C5000 etc) supports
only C.

But: :}
I am not sure what you exactly want to say (I don't know meaning of the
emotion) . But my point is that, for several microcontrollers I am not
finding any C++ compiler (though many of them has a C compiler, some
open-source like SDCC project).In today's world if a microprocessor exists, one can assume a C
compiler exists. Isn't it? I think when a company plans for a new
microprocessor, it chooses an ISA as a first job, and designs a C
cross-compiler for that. Who writes substantial assembly code today!
It's not easy, but there is at least often a fighting chance :)
Yes. But it is the best way to do it, and the chance is pretty high.
That is why GCC and Comeau is doing it, and most of the Post C++
languages comes with a runtime and its own IR representation.
But see above again :) Again, not getting your point.

IMO a toy C compiler cannot be a C compiler 8}
A C compiler is a few man years of work.
--
Yes, definitely. That is the difference between toy and real! But most
of the time must be in optimization, not in parsing. And can you
compare it with the effort given for a C++ compiler? Is it of same
order or of a higher order?
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
My point is just to have a study about how much C++ compilers conform
to the standard. And if they don't, what is the reason (is it the
evolving process of C++ standard, or the complexity of the parser and
the language). It is difficult to MACROING the code everywhere to make
it work for 5-6 different platform. The problem is minimal or nil for
most of the languages (like FORTRAN, C, PASCAL, Java, C# , LISP, Perl,
Python, PHP etc). But surprisingly it exist till today in almost all of
the major vendors of C++ compiler. And the result is some code where
MACROS dominate (Even Boost or STLPort is full of macro, forget about
QT MOC,and wxWidgets MACROS) . So my point is knowing the present
status of the C++ compilers and if they falls sort of standard, the
reason.
Thanks for hearing some experience from a real compiler writer! The
group is really superb!
 
G

Greg Comeau

Greg said:
toton wrote:
Anyone have a link to comparative study of different C++ compilers
and how much they conform to C++ language standard? [...]

But for some processors, like Motorola, TI (C6000, C5000 etc) supports
only C.

But: :}
I am not sure what you exactly want to say (I don't know meaning of the
emotion) . But my point is that, for several microcontrollers I am not
finding any C++ compiler (though many of them has a C compiler, some
open-source like SDCC project).

I just meant to point to the paragraph below.
In today's world if a microprocessor exists, one can assume a C
compiler exists. Isn't it?
Usually.

I think when a company plans for a new
microprocessor, it chooses an ISA as a first job, and designs a C
cross-compiler for that. Who writes substantial assembly code today!
Sure.

Yes. But it is the best way to do it, and the chance is pretty high.
That is why GCC and Comeau is doing it, and most of the Post C++
languages comes with a runtime and its own IR representation.
Sure.

Again, not getting your point.

Just again pointing out what you wrote ("Comeau... can give a compiler
on request...").
Yes, definitely. That is the difference between toy and real!

Well, kind of. That is, either you're writing a subset of
the language, or you're not.
But most
of the time must be in optimization, not in parsing.

One would think so, but then parsing stuff always pops up.
In short, it's always harder than one thinks.
And can you
compare it with the effort given for a C++ compiler? Is it of same
order or of a higher order?

Higher of course.
My point is just to have a study about how much C++ compilers conform
to the standard. And if they don't, what is the reason (is it the
evolving process of C++ standard, or the complexity of the parser and
the language).

I think it's all the above, and then some. Some vendors wait
for a standard to be standardized before implementing it.
Others, have research and/or real works in progress on parts,
all along. Others, may have technical obstables. Others,
have marketing obstacles. And so on. I've foudn that the
reason is often that the sky is the limit. It's just like
any other project I guess.
It is difficult to MACROING the code everywhere to make
it work for 5-6 different platform.

Always is.
The problem is minimal or nil for
most of the languages (like FORTRAN, C, PASCAL, Java, C# , LISP, Perl,
Python, PHP etc).

I never found that to be the case.
But surprisingly it exist till today in almost all of
the major vendors of C++ compiler.

I find it to be a universal problem, though clearly not always exactly
equal and each language with its own set of pros/cons wrt this.
And the result is some code where
MACROS dominate (Even Boost or STLPort is full of macro, forget about
QT MOC,and wxWidgets MACROS) . So my point is knowing the present
status of the C++ compilers and if they falls sort of standard, the
reason.

I doubt you'll ever get to hear all the reasons.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top