[gnu.g++.bug] GNU C++ 1.35.0 fixes

tiemann@YAHI.STANFORD.EDU (Michael Tiemann) (05/12/89)

I put a new g++.xtar.Z on yahi:~ftp/pub.  You can also get the file
`patches', which takes the g++.xtar.Z from last week and makes it
current.  libg++ and GNU C++ are still converging, but if you want
bugfixes, they're here.  Hope to make an "official" release soon,

Michael

schmidt@glacier.ics.uci.edu (Doug Schmidt) (05/13/89)

In article <8905111754.AA03931@yahi.stanford.edu> tiemann@lurch.stanford.edu writes:
++ I put a new g++.xtar.Z on yahi:~ftp/pub.  You can also get the file
++ `patches', which takes the g++.xtar.Z from last week and makes it
++ current.  libg++ and GNU C++ are still converging, but if you want
++ bugfixes, they're here.  Hope to make an "official" release soon,

When the official release comes out be sure to check out the new
support for static member functions.  It is now possible to use C++
classes in a pseudo Ada/Modula 2 fashion.  For example:

----------------------------------------
class stack
{
private:
  static int  st[10];
  static int  top;
     
public:
  static void push (int item) { st[top++] = item; }
  static int pop () { return st[--top]; }
  static int is_empty () { return top == 0; }
  static int is_full () { return top >= 10; }
};

main ()
{
  for (srandom (time ()); !stack::is_full (); stack::push (random ()))
    ;

  while (!stack::is_empty ())
    printf ("%d\n", stack::pop ());
}
----------------------------------------

now works as expected.  This means that you don't always need to
declare objects of a class in order to get the benefits of
encapsulation.  I also assume that function calls for static member
function are slightly faster, since there is no need to pass ``this''
as a hidden parameter.

Also, multiple inheritance support in g++ is getting more robust.
Aggressive g++ users are encouraged to pound on this feature and
report any bugs you find.

Doug
--
On a clear day, under blue skies, there is no need to seek.
And asking about Buddha                +------------------------+
Is like proclaiming innocence,         | schmidt@ics.uci.edu    |
With loot in your pocket.              | office: (714) 856-4043 |