home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5977 < prev    next >
Encoding:
Text File  |  1992-09-04  |  2.9 KB  |  80 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: 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
  3. From: quarrie@cds001.cebaf.gov (David Quarrie)
  4. Subject: Re: the -traditional switch under NeXTSTEP 3.0 ?
  5. Message-ID: <1992Sep4.125625.10199@murdoch.acc.Virginia.EDU>
  6. Sender: usenet@murdoch.acc.Virginia.EDU
  7. Reply-To: quarrie@cds001.cebaf.gov (David Quarrie)
  8. Organization: CEBAF (Continuous Electron Beam Accelerator Facility)
  9. References:  <1992Sep3.133809.8477@murdoch.acc.Virginia.EDU>
  10. Date: Fri, 4 Sep 1992 12:56:25 GMT
  11. Lines: 67
  12.  
  13. --
  14. In article <1992Sep3.133809.8477@murdoch.acc.Virginia.EDU>,
  15. quarrie@cds001.cebaf.gov (David Quarrie) writes:
  16. |>Subject: has anyone tried the -traditional switch under NeXTSTEP 3.0
  17. |>?
  18. |>Reply-To: quarrie@cds001.cebaf.gov (David Quarrie)
  19. |>Organization: CEBAF (Continuous Electron Beam Accelerator Facility)
  20. |>Date: Thu, 3 Sep 1992 13:38:09 GMT
  21. |>
  22. |>Has anyone tried using the -traditional switch to the Ccompiler under
  23. |>NS 3.0?
  24. |>I have the following little test program:
  25. |>
  26. |>    david> cat problem.c
  27. |>
  28. |>    #define CALL(a,b,c) ((a=b),c)
  29. |>    #define CALL_R CALL
  30. |>    void problem (bc)
  31. |>    int *bc;
  32. |>    {
  33. |>           int *t1, *t2;
  34. |>            CALL_R(t1, (int *)(CALL_R(t2, bc, t2)), t1);
  35. |>    }
  36. |>
  37.     [some lines omitted]
  38. |>
  39. |>I've since heard that the solution is to use the -traditional switch
  40. |>to the
  41. |>compiler:
  42. |>
  43.     [remainder of posting omitted]
  44.  
  45. I've just had a rapid response from NeXT on the above. The correct switch is
  46.  
  47.     cc -traditional-cpp
  48.  
  49. which does correctly compile the code sample whilst still correctly locating
  50. the NeXT header files. This is documented in the NeXTSTEP 3.0 Release Notes.
  51.  
  52. Mike Monegan from NeXT says:
  53.  
  54.   NeXT implemented a new version of cpp (cpp-precomp) for NS 3.0 to support 
  55.   precompiled headers.  This is the default preprocessor, but
  56. unfortunately its 
  57.   behavior is not completely identical to the standard GNU cpp.  In case
  58. of the 
  59.   above problem, an obscure bug fix to cpp-precomp was not released in
  60. NS 3.0 due 
  61.   to compiler stability concerns.  Subsequent releases of NeXTSTEP will
  62. contain 
  63.   this fix.  The temporary workaround is to use -traditional-cpp, which
  64. is 
  65.   documented in
  66. /NextLibrary/Documentation/NextDev/ReleaseNotes/Preprocessor.rtf, 
  67.   to get the old behavior (but without precompiled header support).
  68.  
  69. I'd like to thank Paul Richardson and Mike Monegan from NeXT for their help
  70. in tracking this problem down and for pointing out the correct solution. I'd
  71. should also admit to not using the correct channels on this - that's what
  72. NeXTdeveloper support is for. Sorry about the wasted bandwidth.
  73.  
  74. -------------------------------------------------------------------------------
  75.     David Quarrie                    CEBAF MS 12H
  76.                             12000 Jefferson Ave
  77. Internet: quarrie@cebaf.gov                Newport News VA 23606
  78. DECnet  : cebaf::quarrie                Tel: (804) 249-7562
  79. BITNET  : quarrie@cebaf                    Fax: (804) 249-7363
  80.