mdt@YAHI.STANFORD.EDU (Michael Tiemann) (03/16/89)
GNU C++ 1.34.1 and GDB 3.1.1 are now on speaking terms. All C++ features which were supported in GDB+ 2.8.1 should still be supported in GDB 3.1.1. This should be cause for much rejoicing. These packages are available from yahi.stanford.edu by anonymous ftp: -rw-rw-rw- 1 mdt 777829 Mar 15 09:54 g++-1.34.1.tar.Z -rw-rw-rw- 1 mdt 749347 Mar 15 09:33 gdb-3.1.1.tar.Z I have fixed up the Makefile and the README. There is now a config.g++. Please report any machines for which this config file fails when it should not. (i.e., it probably won't work on a VMS VAX, but that's ok with me). Specifically, this file should fix problems for Sun3 (-os3 and -os4 clients). GNU C++ 1.34.1 contains all the changes I have had to make since 1.34.0 to let our internal version of InterViews compile. It should not break much existing code. I also took the liberty of fixing other random bugs and reducing the number of shift-reduce conflicts in the grammar by using some more precedence rules. One of these bugfixes required the following patch to compile libg++: yahi% diff -c2 builtin.h~ builtin.h *** builtin.h~ Sat Mar 4 07:29:42 1989 --- builtin.h Wed Mar 15 00:27:48 1989 *************** *** 43,46 **** --- 43,48 ---- overload sqr; overload testbit; + overload even; + overload odd; #include <std.h> GNU C++ 1.34.1 also has three new experimental features. 1. Named return values. Example: struct A { ... A (); A (A&); ... }; // old way A foo () { A tmp; // calls A() constructor ... things which modify `tmp' ... return tmp; // calls A(A&) constructor } // new way A foo () return tmp; // calls A () constructor on entry { ... things which modify `tmp' ... return tmp; // call to A (A&) constructor not needed } This feature is not controlled by a flag. If you use it, you get it. For all the syntactic variations, please see the grammar. 2. Better constructor elision With the -felide-constructors, the compiler tries to be smarter about when it can elide constructors. With out this flag, GNU C++ and cfront both generate effectively the same code for: A foo (); A x (foo ()); // x is initialized by `foo ()', no ctor called here A y = foo (); // call to `foo ()' heads to temporary, y is initialized from the temporary. Note difference! With this flag, GNU C++ initializes `y' directly from the call to `foo ()' without going through a temporary. This feature breaks implementation-dependent code written by Doug Lea, so use it with caution. 3. The +e0 and +e1 flags are implemented. The +e0 flag means "use externally declared virtual function tables for this file". The +e1 flag means "declare and define public virtual function tables for this file" With neither flag, the compiler does what it did all along: each virtual function table which the compiler needs in a given file is private to that file and laid out. The use of these flags may reduce the amount of space consumed by virtual function tables in some programs. Since GNU C++ already tries to be smart about not writing out virtual function tables if it knows that it does not need them (in that file), these flags will be less useful then they are reputed to be in other C++ compilers. Michael