🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.bugs
Article #25

Re: Recognizing which cc is being used.

#25
From: David B.Anderson
Date: Wed, 23 Dec 1992 21:40
29 lines
1511 bytes
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]
Technical Details
Message-ID: <tvkd8n4@sgi.sgi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!sgigate!sgi!quasar.mti.sgi.com!davea

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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