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