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

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!sgigate!sgi!quasar.mti.sgi.com!davea
  3. From: davea@quasar.mti.sgi.com (David B.Anderson)
  4. Subject: Re: Bug in SGI ansi compliance (or are the others wrong ?)
  5. Message-ID: <s9gbbos@sgi.sgi.com>
  6. Sender: davea@quasar.mti.sgi.com
  7. Organization: Silicon Graphics, Inc.  Mountain View, CA
  8. Date: Thu, 12 Nov 1992 20:19:32 GMT
  9. Lines: 38
  10.  
  11. In article <1992Nov11.225422.2888@bernina.ethz.ch> hoesel@igc.ethz.ch (Frans van Hoesel) writes:
  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. >[removed]
  29.  
  30. >You might find it a '(normally minor)annoyance' but lex produces code
  31. >that does *NOT* compile using -ansi, exactly because of the above reason!!
  32. >(you can check that easely by creating a file with two lines of '%%' 
  33. >(a minimal lex program) run lex with it, and try to compile with -ansi)
  34.  
  35. The problem with lex had been reported already...  I was wrong to call the
  36. problem 'minor' since it would break -ansi compilations of lex output
  37. files. At the time we made the decison to create __stdout we were not aware
  38. of the unfortunate interaction with lex.
  39.  
  40. Anyone using -xansi would not have the problem.
  41.  
  42. In the next major release the problem has been fixed 'properly'.
  43.  
  44. Sorry about the inconvenience.
  45. [ David B. Anderson             (415)390-4263             davea@sgi.com ]
  46.  
  47.  
  48.  
  49.