🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Christian Reiser Tue, 23 Apr 1991 06:41
g++ vs c++
#536
Author: Christian Reiser
Date: Tue, 23 Apr 1991 06:41
77 lines
3902 bytes
For those, who have not read my previous posted question, I
asked for the differences between GNU's g++ 1.37.1 and AT&T's
C++ compiler both compiling C++ language definition 2.0.
(I was not interested in legal problems, because I just want
to estimate the technical aspects.)

By now I got 5 answers (thanks to all of them) and 4 questions 
to post a summary (as I do now). Note, that I did not check
the statements, but just repost them.

*   to port g++ to AT&T, just small things have to be changed.

*   g++ accepts more, but nothing of them is realy importandt
    (you just have to change it.) For instance: static variables
    can be initialized directly in class definitions.

*   g++ 1.37 has problems with multiple inheritance.

*   In g++ 1.37 some minor bugs exist (local enums, ambigous
    function declarations ...)

*   the differences in syntax are not dificult, but the differences
    in fstream are a real big problem.

*   The preprocessor of g++ is ANSI, but AT&T's is not.

*   On some machines, g++ executables are bigger.

*   GNU's way of message passing is more efective and brings 
    advantages in execution speed. Here the part from GNU's manual:

   * The naming convention of GNU C++ and AT&T C++ for overloaded functions
     (and member functions) are incompatible.  You cannot use AT&T C++
     libraries with GNU C++.  Even if the same naming convention were used,
     you still would not want to use libraries compiled by the AT&T compiler.
     Because the AT&T compiler is constrained to generate C code, there are
     some things it cannot implement, such as the way GNU C++ passes objects
     constructed on the stack.  GNU C++ can also make most virtual function
     calls take one or two memory references, while the AT&T compiler must
     make 5 or 6 memory references to do the same thing.  This efficiency has
     its cost: if you want to link with AT&T code, compile it with GNU C++.

*   GNU's error messages and especially debugging possibilies are
    much better. AT&T sometimes only writes "syntax error line XXX".

*   There is no source level debugging posibility at AT&T's.

*   AT&T generates per default warnings, which g++ does not give like

	- unreachable code (after return)
	- function arguments not used

*   For AT&T all include files have to be given, while g++ accepts
    some missing "#include <...>" lines. (Perhaps because some 
    include files include others differently for both compilers.)

This is what I got till now. If you have any comments to this, do
not hesidate to e-mail me. If some interesting aspects occur, I
will post a second summary.

Again thanks to everybody who sent me his comments, I hope this
summary is some help for all.

Greetings from Vienna/Austria
CR
 ---------------------------------------------------------------------------
|          Christian Reiser         |   Tel.:   +431 39 16 21 / 247         |
|     Alcatel Austria - Elin RC     |   Fax.:   +431 39 14 52               |
|   Ruthnergasse 1-7, A-1210 Wien   |   E-mail: fs_reise@rcvie.at           |
|              Austria              | or: ...(!mcsun)!tuvie!rcvie!fs_reise  |
 ---------------------------------------------------------------------------

-- 
Greetings from Vienna/Austria
CR

 ---------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads