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

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!mcsun!chsun!bernina!torda
  3. From: torda@igc.ethz.ch (Andrew Torda)
  4. Subject: Bug in SGI ansi compliance (or are the others wrong ?)
  5. Message-ID: <1992Nov9.140450.591@bernina.ethz.ch>
  6. Summary: SGI's compiler disagrees with two others I tried
  7. Sender: news@bernina.ethz.ch (USENET News System)
  8. Organization: Computational Chemistry, ETH, Zuerich
  9. Date: Mon, 9 Nov 1992 14:04:50 GMT
  10. Lines: 23
  11.  
  12. The following two lines of code don't compile with the -ansi option to
  13. the sgi cc compiler (version 3.10)
  14.  
  15. ---------- begin code ----------
  16. #include <stdio.h>
  17. FILE *fp = stdout;
  18. ---------- end code   ----------
  19.  
  20. On an sgi machine I get:
  21. % cc -c z.c
  22. % cc -c -ansi z.c
  23. accom: Error: z.c, line 2: integer constant expected
  24.        FILE *fp =       (__stdout) ;
  25.        ----------------------------^
  26.  
  27. but it compiles using gcc's -pedantic option and the strict
  28. conformance option to sun's unbundled ansi C compiler.
  29.  
  30. Which compiler is correct ? SGI's or the others ?
  31. -Andrew
  32. -- 
  33.  
  34. Andrew Torda, Computational Chemistry, ETH, Zurich, torda@igc.ethz.ch
  35.