home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!news
- From: patl@golem.mit.edu (Patrick J. LoPresti)
- Newsgroups: comp.sys.next.misc
- Subject: Re: 3.0's C compiler ?
- Message-ID: <1992Aug14.051526.17919@athena.mit.edu>
- Date: 14 Aug 92 05:15:26 GMT
- References: <1992Aug13.142923.4575@cube.handheld.com>
- Sender: news@athena.mit.edu (News system)
- Organization: Massachvsetts Institvte of Technology
- Lines: 71
- Nntp-Posting-Host: monolith.mit.edu
-
- In article <1992Aug13.142923.4575@cube.handheld.com> jmd@cube.handheld.com (Jim
- De Arras) writes:
- > In article <1992Aug12.042213.29139@dtint.uucp> nevin@dtint.dtint.com writes:
- > > So, what's the REAL gnu version of the NeXT compiler?
- > >
- > > Alright, you might find a couple of other differences between the
- > > C compiler shipped in 3.0 and the latest GNU version, but I for
- > > one have no idea of what they might be. Anyone else care to
- > > enlighten us?
- > >
- > >
- >
- > Per GNU, (check the newsgroups!) all 2.x releases are beta, and not ready for
- > prime time!
- >
- > Jim
-
- While this is technically true, we have found the 2.2.2 release of GCC to be AT
- LEAST as reliable as the NeXTStep 3.0 cc. GCC has an extensive set of beta
- testers and talented developers, and is generally quite robust. The only
- serious problems are with ports to new architectures, and with experimental
- optimizations (e.g., "-funroll-loops").
-
- Releases 1.9x from GNU were alpha releases of the GCC 2 compiler. I do not
- know whether the 1.93 from "cc -version" under 3.0 is derived from this
- convention.
-
- GCC 2.2.2 has minor fixes compared to GCC 2.2, which has major fixes compared
- to GCC 2.0. Always get the latest version :-).
-
- Here is my attempt to sketch the differences between the NeXT 3.0 cc and the
- current GCC.
-
- Unlike GCC 2.2.2, NeXT cc has:
-
- - New Objective-C keywords, like "@protocol" and "@class"
- - "id" as a built-in type, not a "typedef void *"
- - cpp modifications to support the "new and improved" header file structure,
- plus support for '#include "m68k/" "foo.h"' (for example)
- - Precompiled headers
- - "Literal NXConstant String Objects"; i.e., syntactic sugar for creating
- strings (This [finally] gives C a *real* string type, complete with fancy
- operators. It should also facilitate the move to international character sets.
- Maybe.)
- - More new Objective-C keywords, like "@public" and "@private"
-
-
- Unlike NeXT cc, GCC 2.2.2 has:
-
- - Computed gotos
- - Arrays of labels
- - Explicit initialization of array and structure elements; for example, "int
- a[6] = { [4] 30, [2] 20 };" is the same as "int a[6] = {0, 0, 20, 0, 30, 0};".
- "NXPoint p = { y: 2, x: 10};" will do the obvious.
- - Case ranges, like "case 1 ... 40:"
- - A somewhat better optimizer
-
- NOTE: This information is based on the NS 3.0pr1 C compiler. It is probably
- incomplete, and may well be inaccurate with respect to the shipped version of
- NS 3.0.
-
- Mat Hostetter (mjhostet@athena.mit.edu) and I hacked up the GCC 2.2.2
- preprocessor to allow us to compile C programs under NS 3.0pr1. We did not
- attempt to incorporate the new Objective-C keywords. So we can currently
- compile C programs, but not Objective-C (some ObjC header files use the new
- keywords).
-
- Perhaps GNU will incorporate the new ObjC features into GCC in the near future.
- Let us hope so.
-
- - Pat
-