home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!sgigate!sgi!igor!kevin
- From: kevin@tamri.com (Kevin Dalley)
- Subject: Re: Bug in SGI ansi compliance (or are the others wrong ?)
- In-Reply-To: hoesel@igc.ethz.ch's message of Wed, 11 Nov 1992 22:54:22 GMT
- Message-ID: <KEVIN.92Nov17165341@polkacide.tamri.com>
- Summary: sgi's header files are broken
- Lines: 52
- Sender: kevin@igor.tamri.com (Kevin Dalley)
- Reply-To: kevin@tamri.com
- Organization: TOSHIBA America MRI, South San Francisco, CA
- References: <s5c02sg@sgi.sgi.com> <1992Nov11.225422.2888@bernina.ethz.ch>
- Date: Wed, 18 Nov 92 00:53:43 GMT
- Lines: 52
-
-
- Look at SGI's header files sometime. A lot of things are slightly or
- badly broken when using "-ansi" because "sgi" is not defined. Of
- course "__sgi__" is defined, but the header files usually say "#ifdef
- sgi". A few functions are left undefined; a few macros are defined
- incorrectly; some structures are defined incorrectly. Because of this
- problem, you may want to stay away from "-ansi" completely.
-
- On the other hand, a few things are broken when "__STDC__" is not
- defined. For example, rename and remove are left undefined. Because
- of this problem, you may want to use "-ansi".
-
- I am in the process of filing a bug report on these problems. I
- finally grew tired of trying to outguess the header files.
-
- >>>>> On Wed, 11 Nov 1992 22:54:22 GMT, hoesel@igc.ethz.ch (Frans van
- Hoesel) said:
- > In article <s5c02sg@sgi.sgi.com> davea@quasar.mti.sgi.com (David B.Anderson) writes:
- >>In article <1992Nov9.140450.591@bernina.ethz.ch> torda@igc.ethz.ch (Andrew Torda) writes:
- >>>The following two lines of code don't compile with the -ansi option to
- >>>the sgi cc compiler (version 3.10)
- >>>
- >>>---------- begin code ----------
- >>>#include <stdio.h>
- >>>FILE *fp = stdout;
- >>>---------- end code ----------
- >>>
- >>>% cc -c -ansi z.c
- >>>accom: Error: z.c, line 2: integer constant expected
- >>> FILE *fp = (__stdout) ;
- >>> ----------------------------^
- >>
- >>This (normally minor)annoyance was introduced with -ansi because
- >>The value of stdout with -xansi is (&_iob[1]) which, though a constant,
- >>collides with the user namespace in:
- > [removed]
- >>
- >>I a future release the constant form is reintroduced and stdout is
- >>(&__iob[1]) when a pure ANSI C namespace is requested.
- >>
- >>Sorry, but for 4.0.x we could not rename _iob. It was too far-reaching
- >>a change to contemplate.
- >>[ David B. Anderson (415)390-4263 davea@sgi.com ]
-
- > You might find it a '(normally minor)annoyance' but lex produces code
- > that does *NOT* compile using -ansi, exactly because of the above reason!!
- > (you can check that easely by creating a file with two lines of '%%'
- > (a minimal lex program) run lex with it, and try to compile with -ansi)
- --
- Kevin Dalley
- Toshiba America MRI, Inc.
- kevin@tamri.com
-