🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Brian Anderson Fri, 15 Sep 1989 12:00
how much of C++ 2.0 does g++ support?
#124
Author: Brian Anderson
Date: Fri, 15 Sep 1989 12:00
25 lines
1323 bytes
Can anyone give me a *clear* description of which features of AT&T's C++
2.0 are *not* supported by the current release of g++ (1.35.1-)?  My main
concerns are:

a) can new and delete be overloaded?

b) does new allow user specified placement?

c) are pure virtual functions allowed?

d) can the -> and , operator be overloaded?

e) is type safe linkage supported (i.e. is the overload operator
required)?

Thank you for your help

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Brian G. Anderson                                       |
NYU Ultracomputer Research Project                     |||
715 Broadway  Rm. 1006                                |||||
New York, NY  10003                                   |||||
(212) 998-3346                                     --- //\ ---
arpa:	andersnb@cmcl2                             ----/ \----
uucp:	{ihnp4,seismo}!cmcl2!andersnb              ----   ----
how much of C++ 2.0 does g++ support?
#135
Author: Michael Tiemann
Date: Tue, 19 Sep 1989 17:10
58 lines
2272 bytes
   Date: 15 Sep 89 12:00:34 GMT
   From: andersnb@nyu.edu  (Brian Anderson)
   Organization: New York University, Ultracomputer project
   Sender: info-g++-request@prep.ai.mit.edu

   Can anyone give me a *clear* description of which features of AT&T's C++
   2.0 are *not* supported by the current release of g++ (1.35.1-)?  My main
   concerns are:

   a) can new and delete be overloaded?
Yes.

   b) does new allow user specified placement?
Yes, but with a different syntax.  The AT&T syntax is impossible to do
with an LALR grammar.  For GNU C++ you say

	char *p = new { London } char[10];

in AT&T C++ you say

	char *p = new ( London ) char[10];

You could do this in a header file:

#ifdef __GNUG__
#define NEW(WHERE) new { WHERE }
#else
#define NEW(WHERE) new ( WHERE )
#endif

and then say

	char *p = NEW ( London ) char[10];

   c) are pure virtual functions allowed?
Yes.

   d) can the -> and , operator be overloaded?
Yes and no.  You can overload ->, but I have not implemented
overloaded ',' yet.

   e) is type safe linkage supported (i.e. is the overload operator
   required)?
It is supported.  The overload specifier is no longer needed.

   Thank you for your help

   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Brian G. Anderson                                       |
   NYU Ultracomputer Research Project                     |||
   715 Broadway  Rm. 1006                                |||||
   New York, NY  10003                                   |||||
   (212) 998-3346                                     --- //\ ---
   arpa:	andersnb@cmcl2                             ----/ \----
   uucp:	{ihnp4,seismo}!cmcl2!andersnb              ----   ----

Michael
new(fu) vs new{fu} (was how much of C++ 2.0 does g++ support?)
#136
Author: Andrew Klossner
Date: Tue, 19 Sep 1989 23:33
26 lines
1283 bytes
Michael said:

> For GNU C++ you say
> 	char *p = new { London } char[10];
> in AT&T C++ you say
> 	char *p = new ( London ) char[10];
> 
> You could do this in a header file:
> #ifdef __GNUG__
> #define NEW(WHERE) new { WHERE }
> #else
> #define NEW(WHERE) new ( WHERE )
> #endif

Or, without learning to capitalize new, you could do:

#ifdef __GNUG__
#define new(where) new { where }
#endif

A quick experiment suggests that GNU CPP doesn't try to expand
parametered macros when encountered without parameters.  Without this
behavior, this trick wouldn't work.

  -=- Andrew Klossner   (uunet!tektronix!frip.WV.TEK!andrew)    [UUCP]
                        (andrew%frip.wv.tek.com@relay.cs.net)   [ARPA]
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