Topic: ANSI C++


Author: JuanManuel.Teijido@imt.unine.ch
Date: 12 Oct 93 08:28:30 MET
Raw View
As some editors seem to wait that the ANSI C++ specifications are fixed in
order to implement some features (I am thinking to TEMPLATES and to
MS), I would like to know when the ANSI C++ standard will be published...

If somebody knows...

                              - Manuel




Author: harold@fmrco (Harold Naparst)
Date: 9 May 91 21:08:46 GMT
Raw View
What is the status of ANSI C++ ?  Is is a standard, or just
a proposed standard ?


What is the basis of ANSI C++ ?  Is it the same as AT+T 2.1,
or is it not compatible with it ?

How compatible is G++ with the ANSI C++ standard ?

--
Harold Naparst               |  (uunet!fmrco!harold)
Fidelity Investments         |  (617)-570-2587
82 Devonshire St., #I40B     |  The opinions expressed herein are not those
Boston, MA  02109            |  of my employer.




Author: jbuck@janus.Berkeley.EDU (Joe Buck)
Date: 10 May 91 18:55:17 GMT
Raw View
In article <1991May9.210846.10508@fmrco> harold@fmrco (Harold Naparst) writes:
>What is the status of ANSI C++ ?  Is is a standard, or just
>a proposed standard ?

Neither.  At this point, there is a group that is working to produce
a standard, and there is a base document, Ellis and Stroustrup's
"The Annotated C++ Reference Manual" (which you will see referred to
on the net as "the ARM" or "E&S").  The ANSI C standard is also a
base document.

>What is the basis of ANSI C++ ?  Is it the same as AT+T 2.1,
>or is it not compatible with it ?

As I said above, the basis they're working from is the ARM, which is
very close to, but not identical with, AT&T version 2.1.

>How compatible is G++ with the ANSI C++ standard ?

It attempts to be close, but there are a number of small differences.
Mike Tiemann, author of g++, has promised that future versions of g++
will "track the ANSI standard", and he's a voting member of the ANSI
standards committee.

Here are some differences (as of g++ 1.39):

1) The "delete [] pointerToArrayofObjects" syntax isn't supported.
2) The syntax for overloading operator new and specifying a placement
for the new memory is different.
3) The parser sometimes has trouble with function pointer arguments,
you can get around these by using a typedef for the "pointer to
function" or "pointer to member function" type.
4) "class Derived : protected Base" isn't supported (it isn't supported
in AT&T 2.0 either, don't know about 2.1)
5) The supplied stream classes are roughly compatible with the AT&T
1.2 stream classes, not the 2.0 ones.  The standards committee will
probably specify something like the 2.0 behavior, but this isn't
finalized yet.
6) Compiler bugs, mainly in the area of multiple inheritance.

g++ provides a number of extensions as well.
--
--
Joe Buck
jbuck@janus.berkeley.edu  {uunet,ucbvax}!janus.berkeley.edu!jbuck




Author: wmm@world.std.com (William M Miller)
Date: 11 May 91 19:59:08 GMT
Raw View
harold@fmrco (Harold Naparst) writes:
> What is the status of ANSI C++ ?  Is is a standard, or just
> a proposed standard ?

Neither, yet.  A committee, X3J16, was formed in December of 1989 and is
meeting three times a year, with lots of informal activity outside the
regular meetings.  In addition, an ISO working group for C++, WG21, has been
authorized; their organizational meeting will be held in conjunction with
the next X3J16 meeting next month in Lund, Sweden.  The best guess for
public review of a draft proposed standard is probably late 1993 or early
1994.

> What is the basis of ANSI C++ ?  Is it the same as AT+T 2.1,
> or is it not compatible with it ?

The base documents adopted by X3J16 are the AT&T 2.1 reference manual (note
that several features described in that manual were not actually implemented
by release 2.1 of cfront; release 3.0 of cfront will conform much more
closely to the 2.1 specification) and X3.159-1989, the ANSI C Standard.  In
July, 1990, the committee adopted wholesale all the changes (there weren't
many) from the base document reflected in the first printing of _The
Annotated C++ Reference Manual_, by Margaret Ellis and Bjarne Stroustrup
(Addison/Wesley), which explains the technically-inaccurate but
functionally-correct logo "ANSI Base Document" emblazoned on the cover of
the book.  Since then, there have been two major additions to the language
(templates and exceptions, both in virtually identical form to the
description in the commentary sections of E&S) and a number of minor
corrections, nearly all of which are reflected in the third printing of E&S
and which were described in a posting by Bjarne Stroustrup last November.

> How compatible is G++ with the ANSI C++ standard ?

I'll leave this question to people more familiar with G++ (with a note that
it's inappropriate to talk about compatibility with a nonexistent standard;
there won't be an "ANSI-compatible C++ compiler" until there's an ANSI
standard -- at least).

-- William M. Miller, Glockenspiel, Ltd.; vice chair, X3J16
   wmm@world.std.com