Thread View: gnu.g++.bug
2 messages
2 total messages
Started by Michael Tiemann
Thu, 11 May 1989 17:54
GNU C++ 1.35.0 fixes
Author: Michael Tiemann
Date: Thu, 11 May 1989 17:54
Date: Thu, 11 May 1989 17:54
6 lines
710 bytes
710 bytes
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
Re: GNU C++ 1.35.0 fixes
Author: Doug Schmidt
Date: Fri, 12 May 1989 18:47
Date: Fri, 12 May 1989 18:47
50 lines
2332 bytes
2332 bytes
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 |
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