home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16308 < prev    next >
Encoding:
Text File  |  1992-11-11  |  2.1 KB  |  51 lines

  1. Newsgroups: comp.sys.sgi
  2. 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
  3. From: hoesel@igc.ethz.ch (Frans van Hoesel)
  4. Subject: Re: Bug in SGI ansi compliance (or are the others wrong ?)
  5. Message-ID: <1992Nov11.225422.2888@bernina.ethz.ch>
  6. Sender: news@bernina.ethz.ch (USENET News System)
  7. Organization: University of Groningen, the Netherlands
  8. References: <s5c02sg@sgi.sgi.com>
  9. Date: Wed, 11 Nov 1992 22:54:22 GMT
  10. Lines: 39
  11.  
  12. In article <s5c02sg@sgi.sgi.com> davea@quasar.mti.sgi.com (David B.Anderson) writes:
  13. >In article <1992Nov9.140450.591@bernina.ethz.ch> torda@igc.ethz.ch (Andrew Torda) writes:
  14. >>The following two lines of code don't compile with the -ansi option to
  15. >>the sgi cc compiler (version 3.10)
  16. >>
  17. >>---------- begin code ----------
  18. >>#include <stdio.h>
  19. >>FILE *fp = stdout;
  20. >>---------- end code   ----------
  21. >>
  22. >>% cc -c -ansi z.c
  23. >>accom: Error: z.c, line 2: integer constant expected
  24. >>       FILE *fp =       (__stdout) ;
  25. >>       ----------------------------^
  26. >
  27. >This (normally minor)annoyance was introduced with -ansi because
  28. >The value of stdout with -xansi is (&_iob[1]) which, though a constant,
  29. >collides with the user namespace in:
  30. [removed]
  31. >
  32. >I a future release the constant form is reintroduced and stdout is
  33. >(&__iob[1]) when a pure ANSI C namespace is requested.
  34. >
  35. >Sorry, but for 4.0.x we could not rename _iob. It was too far-reaching
  36. >a change to contemplate.
  37. >[ David B. Anderson             (415)390-4263             davea@sgi.com ]
  38.  
  39. You might find it a '(normally minor)annoyance' but lex produces code
  40. that does *NOT* compile using -ansi, exactly because of the above reason!!
  41. (you can check that easely by creating a file with two lines of '%%' 
  42. (a minimal lex program) run lex with it, and try to compile with -ansi)
  43.  
  44. -- frans
  45.  
  46. -- 
  47. ===========================================================================
  48. ===  frans van hoesel               scientific research programmer      ===
  49. ===  hoesel@igc.ethz.ch             seeking a JOB in europa             ===
  50. ===========================================================================
  51.