By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,411 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,411 IT Pros & Developers. It's quick & easy.

C++ standard compiler comparative study

P: n/a
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

Oct 20 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
toton wrote:
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

Oct 20 '06 #2

P: n/a
toton wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Oct 20 '06 #3

P: n/a

Victor Bazarov wrote:
toton wrote:
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.
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Oct 23 '06 #4

P: n/a
In article <11**********************@b28g2000cwb.googlegroups .com>,
toton <ab*******@gmail.comwrote:
>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: :}
>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.
--
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?
Oct 23 '06 #5

P: n/a

Greg Comeau wrote:
In article <11**********************@b28g2000cwb.googlegroups .com>,
toton <ab*******@gmail.comwrote:
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).
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.
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.
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 :)
Again, not getting your point.
(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.
--
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!

Oct 24 '06 #6

P: n/a
In article <11*********************@m7g2000cwm.googlegroups.c om>,
toton <ab*******@gmail.comwrote:
>Greg Comeau wrote:
>In article <11**********************@b28g2000cwb.googlegroups .com>,
toton <ab*******@gmail.comwrote:
>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.
>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.
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.
>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.
Sure.
>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 :)
Again, not getting your point.
Just again pointing out what you wrote ("Comeau... can give a compiler
on request...").
(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.
--
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.
--
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?
Oct 25 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.