This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ANSI compliance bug in Apple C compiler on OS X
- To: Zack Weinberg <zackw at stanford dot edu>
- Subject: Re: ANSI compliance bug in Apple C compiler on OS X
- From: Michael Hopkins <mhopkins at netmatters dot co dot uk>
- Date: Tue, 30 Jan 2001 00:49:28 +0000
- CC: Andrew Pinski <pinskia at physics dot uc dot edu>, Drew Reynolds <drew at actel dot com>, macosx-dev at omnigroup dot com, R Clint Whaley <rwhaley at cs dot utk dot edu>, gcc-bugs at gcc dot gnu dot org
- Organization: ACS Consultancy
- References: <14966.1454.604833.553285@amer.actel.com> <200101300011.f0U0BG210132@fire.phy.uc.edu> <20010129162753.K525@wolery.stanford.edu>
- Reply-To: mhopkins at netmatters dot co dot uk
Is there a way for me to use a current pre-processor to spit out
an intermediate file to feed to the Apple cc? Sorry for the naive
question - I'm a UNIX/GNU tools novice...
Mike
Zack Weinberg wrote:
>
> On Mon, Jan 29, 2001 at 07:11:16PM -0500, Andrew Pinski wrote:
>
> > One thing this is not a bug in Apple's compiler I just tried it on
> > the newest gcc (cvs checkout about 3pm) on linux ia86. So no need to
> > send in a bug.
>
> Hm, I just tried it on the newest gcc on linux/x86 (cvs checkout of
> about a minute ago). This pruned version of your test case:
>
> #define Mjoin(pre, nam) my_join(pre, nam)
> #define my_join(pre, nam) pre ## nam
> #define Mstr2(m) # m
> #define Mstr(m) Mstr2(m)
>
> Mstr(Mjoin(Mjoin(atlas_,d),NCmm.h))
>
> produces
>
> "atlas_dNCmm.h"
>
> when preprocessed. If I put the #include back, it correctly tries to
> find the header file.
>
> GCC's preprocessor was completely rewritten over the course of 2000,
> and anyone whose code base was taken from snapshots in that time is
> likely to have gotten a buggy version. There were definitely issues
> with insertion of spaces where none were necessary. I don't know the
> heritage of the OSX compiler. You should definitely take this up with
> them.
>
> zw
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/_/ _/_/_/ _/_/_/ ACS Consultancy
_/ _/ _/ _/ _/
_/_/_/_/ _/ _/_/_/ Information Sciences for Industry
_/ _/ _/ _/
_/ _/ _/_/_/ _/_/_/ Telephone/Fax: 01732~463519 (UK)
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
`All models are wrong, but some are useful' - George Box