Article View: comp.sys.next.programmer
Article #1097Re: the -traditional switch under NeXTSTEP 3.0 ?
From: David Quarrie
Date: Fri, 04 Sep 1992 12:56
Date: Fri, 04 Sep 1992 12:56
67 lines
3033 bytes
3033 bytes
--
In article <1992Sep3.133809.8477@murdoch.acc.Virginia.EDU>,
quarrie@cds001.cebaf.gov (David Quarrie) writes:
|>Subject: has anyone tried the -traditional switch under NeXTSTEP 3.0
|>?
|>Reply-To: quarrie@cds001.cebaf.gov (David Quarrie)
|>Organization: CEBAF (Continuous Electron Beam Accelerator Facility)
|>Date: Thu, 3 Sep 1992 13:38:09 GMT
|>
|>Has anyone tried using the -traditional switch to the Ccompiler under
|>NS 3.0?
|>I have the following little test program:
|>
|> david> cat problem.c
|>
|> #define CALL(a,b,c) ((a=b),c)
|> #define CALL_R CALL
|> void problem (bc)
|> int *bc;
|> {
|> int *t1, *t2;
|> CALL_R(t1, (int *)(CALL_R(t2, bc, t2)), t1);
|> }
|>
[some lines omitted]
|>
|>I've since heard that the solution is to use the -traditional switch
|>to the
|>compiler:
|>
[remainder of posting omitted]
I've just had a rapid response from NeXT on the above. The correct switch is
cc -traditional-cpp
which does correctly compile the code sample whilst still correctly locating
the NeXT header files. This is documented in the NeXTSTEP 3.0 Release Notes.
Mike Monegan from NeXT says:
NeXT implemented a new version of cpp (cpp-precomp) for NS 3.0 to support
precompiled headers. This is the default preprocessor, but
unfortunately its
behavior is not completely identical to the standard GNU cpp. In case
of the
above problem, an obscure bug fix to cpp-precomp was not released in
NS 3.0 due
to compiler stability concerns. Subsequent releases of NeXTSTEP will
contain
this fix. The temporary workaround is to use -traditional-cpp, which
is
documented in
/NextLibrary/Documentation/NextDev/ReleaseNotes/Preprocessor.rtf,
to get the old behavior (but without precompiled header support).
I'd like to thank Paul Richardson and Mike Monegan from NeXT for their help
in tracking this problem down and for pointing out the correct solution. I'd
should also admit to not using the correct channels on this - that's what
NeXTdeveloper support is for. Sorry about the wasted bandwidth.
-------------------------------------------------------------------------------
David Quarrie CEBAF MS 12H
12000 Jefferson Ave
Internet: quarrie@cebaf.gov Newport News VA 23606
DECnet : cebaf::quarrie Tel: (804) 249-7562
BITNET : quarrie@cebaf Fax: (804) 249-7363
Technical Details
Message-ID:
<1992Sep4.125625.10199@murdoch.acc.Virginia.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sdd.hp.com!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!uvaarpa!murdoch!cds001.cebaf.gov!quarrieReferences:
<1992Sep3.133809.8477@murdoch.acc.Virginia.EDU>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sdd.hp.com!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!uvaarpa!murdoch!cds001.cebaf.gov!quarrie From: quarrie@cds001.cebaf.gov (David Quarrie) Subject: Re: the -traditional switch under NeXTSTEP 3.0 ? Message-ID: <1992Sep4.125625.10199@murdoch.acc.Virginia.EDU> Sender: usenet@murdoch.acc.Virginia.EDU Reply-To: quarrie@cds001.cebaf.gov (David Quarrie) Organization: CEBAF (Continuous Electron Beam Accelerator Facility) References: <1992Sep3.133809.8477@murdoch.acc.Virginia.EDU> Date: Fri, 4 Sep 1992 12:56:25 GMT Lines: 67