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: Andrew Pinski <pinskia at physics dot uc dot edu>
- Subject: Re: ANSI compliance bug in Apple C compiler on OS X
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Mon, 29 Jan 2001 16:27:53 -0800
- Cc: Drew Reynolds <drew at actel dot com>, mhopkins at netmatters dot co dot uk, macosx-dev at omnigroup dot com, R Clint Whaley <rwhaley at cs dot utk dot edu>, gcc-bugs at gcc dot gnu dot org
- References: <14966.1454.604833.553285@amer.actel.com> <200101300011.f0U0BG210132@fire.phy.uc.edu>
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