home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16571 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.8 KB  |  68 lines

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