home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / bugs / 37 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.4 KB

  1. Path: sparky!uunet!olivea!sgigate!sgi!quasar.mti.sgi.com!davea
  2. From: davea@quasar.mti.sgi.com (David B.Anderson)
  3. Newsgroups: comp.sys.sgi.bugs
  4. Subject: Re: Recognizing which cc is being used.
  5. Message-ID: <tvkd8n4@sgi.sgi.com>
  6. Date: 23 Dec 92 21:40:32 GMT
  7. Sender: davea@quasar.mti.sgi.com
  8. Organization: Silicon Graphics, Inc.  Mountain View, CA
  9. Lines: 29
  10.  
  11. In article <BzqCEy.HG9@math.uwaterloo.ca> rbutterw@math.uwaterloo.ca (Ray Butterworth [MFCF]) writes:
  12. >The cc(1) on IRIX 4.0.5f seems to operate in 3 different modes:
  13. >-cckr, -ansi, and -xansi.
  14. >
  15. >-ansi  defines __STDC__
  16. >-xansi doesn't, but does define __EXTENSIONS__
  17. >-cckr also doesn't define __STDC__, and it also defines __EXTENSIONS__.
  18. >
  19. >How is one supposed to test (in the source) which of the
  20. >last two modes the compiler is running under?
  21. >(I suggest that -cckr should set some symbol to indicate this.)
  22.  
  23. See below
  24.  
  25. >In particular, does one use  token/**/token  or  token##token
  26. >to join two cpp tokens in a macro?
  27.  
  28. Yes if ansi cpp (__ANSI_CPP__ is defined), no if not.
  29. I have not figured out, or seen, any portable way to determine if ANSI CPP
  30. or traditional Reiser cpp is in use.
  31.  
  32. I've been convinced that I was being wrongheaded: future releases 
  33. WILL define __STDC__ with -xansi.
  34.  
  35. At that time, you will be able to test __STDC__
  36.  
  37. For now, well.....
  38. [ David B. Anderson             (415)390-4263             davea@sgi.com ]
  39. [ I am also sending mail: I though this was of enough general interest to post]
  40.