home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!chx400!bernina!hoesel
- From: hoesel@igc.ethz.ch (Frans van Hoesel)
- Subject: Re: Bug in SGI ansi compliance (or are the others wrong ?)
- Message-ID: <1992Nov11.225422.2888@bernina.ethz.ch>
- Sender: news@bernina.ethz.ch (USENET News System)
- Organization: University of Groningen, the Netherlands
- References: <s5c02sg@sgi.sgi.com>
- Date: Wed, 11 Nov 1992 22:54:22 GMT
- Lines: 39
-
- 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)
-
- -- frans
-
- --
- ===========================================================================
- === frans van hoesel scientific research programmer ===
- === hoesel@igc.ethz.ch seeking a JOB in europa ===
- ===========================================================================
-