Topic: G++ and the ISO/ANSI Standard
Author: ncm@nospam.cantrip.org (Nathan Myers)
Date: 1998/11/02 Raw View
David Wieringa <wieringa@xroads.com> wrote:
>Due to the likihood of having to move this to another platform (and
>quite possibly another compiler for political reasons) and the fact that
>many of our developers are just learning the language, I'm thinking it
>would be rather important to use a compiler which is ISO/ANSI compliant.
>
>Has anyone on the GNU effort been tracking how close g++ and its
>standard library complies with the standard? I didn't see this info in
>the FAQ.
>
>Can anyone give me ideas where we might run into porting problems? (as
>far as the C++ language and standard library go) I haven't been able to
>keep up with the changes to the standard, but I do believe I remember
>some things changing names and such (eg some stream classes).
The most likely problems you will have will come from the other
compiler being less conformant than g++. (I refer to the Egcs g++,
v1.x here. The "official" GNU g++-2.8.x is a dead project.) However,
IBM's new compiler is reputed to be more complete; it has been
reported that it, uniquely, supports the "export" keyword.
The place where Egcs is currently most backward is in its library.
It has a modern STL, but its iostream implementation is about at
ATT cfront level. (A replacement is being worked on.)
There are no more "changes to the standard"; it is an ISO Standard,
number 14882. Now it's just a matter of matching it.
--
Nathan Myers
ncm@nospam.cantrip.org http://www.cantrip.org/
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: tgakem@sg14.chem.tue.nl (Eric Meijer)
Date: 1998/11/03 Raw View
David Wieringa (wieringa@xroads.com) wrote:
[ ... ]
: Has anyone on the GNU effort been tracking how close g++ and its
: standard library complies with the standard? I didn't see this info in
: the FAQ.
: Can anyone give me ideas where we might run into porting problems? (as
: far as the C++ language and standard library go) I haven't been able to
: keep up with the changes to the standard, but I do believe I remember
: some things changing names and such (eg some stream classes).
You will need the egcs version of the C++ compiler, as it is closer to
the standard than the gnu g++. Only the most recent versions of this
compiler have namespaces support. I think the STL implementation is
mostly working, but not yet completely complete. For porting isssues it
won't hurt if you use a subset. Always be careful about templates.
They will pose your single most problem in porting, partly because the
standard leaves the nasty implementation details to the implementors.
If you will port your applications to many different platforms, it is
not a bad idea at all to stick to GNU g++ or egcs++, since these
compilers are very portable. See
http://sourceware.cygnus.com/sourcecode.html for references to the egcs
compiler and the standard C++ library.
HTH,
Eric
--
E.L. Meijer
Eindhoven Univ. of Technology
Lab. for Catalysis and Inorg. Chem.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Ron Natalie <ron@sensor.com>
Date: 1998/11/05 Raw View
David Wieringa wrote:
>
>
> Has anyone on the GNU effort been tracking how close g++ and its
> standard library complies with the standard? I didn't see this info in
> the FAQ.
>
I guess the only good thing I can say about G++ is it's a lot
closer to the standard than the product (4.2) SparcWorks C++
compiler.
If you are really concerned about the standards don't forget
the -pedantic-error flag to keep your programmers from relying
on stupid Gnuisms. You can also pick up a decent STL from
SGI for use with either compiler.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: David Wieringa <wieringa@xroads.com>
Date: 1998/11/02 Raw View
We're porting some software to C++ (from another language) under the
Solaris 2.5 operating system. We will probably also port this to AIX in
the future.
Most of our developers are just learning C++.
Due to the likihood of having to move this to another platform (and
quite possibly another compiler for politcal reasons) and the fact that
many of our developers are just learning the language, I'm thinking it
would be rather important to use a compiler which is ISO/ANSI compliant.
Has anyone on the GNU effort been tracking how close g++ and its
standard library complies with the standard? I didn't see this info in
the FAQ.
Can anyone give me ideas where we might run into porting problems? (as
far as the C++ language and standard library go) I haven't been able to
keep up with the changes to the standard, but I do believe I remember
some things changing names and such (eg some stream classes).
Any assistance is appreciated,
David Wieringa
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]