This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting GCC to compilation with C++
On Thu, Jul 15, 2004 at 01:15:46PM +0100, Bernd Schmidt wrote:
> I'm slightly worried by this discussion, as I recall trying to write a
> portable program in C++ and giving up because I could not find two C++
> compilers that would agree on the language. Admittedly, that was a
> decade ago and compilers have gotten better,
The C++ standard was completed in December 1997, and it took a few years
for compiler vendors (and gcc) to get somewhere near compliance.
Your experience from years before the language was standardized is not
terribly relevant now that we've had a standard for 6.5 years.
> still true that today's C++ code does not compile with tomorrow's
> compilers (eon from SPEC2000 for example doesn't build out of the box
> with recent g++).
... which is a bug in eon, worked around by many compilers.
I've spent years writing vast quantities of C++ code that works on at
least five distinct C++ compilers. Sometimes it's not easy, but at this
stage all the compiler support teams make a strong effort to support the
standard.
Certainly there are aspects of ISO C++ that can't be used in portable
code: export for templates, for example.