From Xander.Schrijen@phil.uu.nl Mon Jul  9 12:20:06 2001
Received: from boole.admin.phil.uu.nl (boole.admin.phil.uu.nl [131.211.140.25])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f69AK5X19736;
	Mon, 9 Jul 2001 12:20:06 +0200 (MET DST)
Received: from baldrick (baldrick.mac.obp.phil.uu.nl [131.211.143.24])
	by boole.admin.phil.uu.nl (Postfix) with ESMTP
	id 6A5E3AD59C; Mon,  9 Jul 2001 12:20:00 +0200 (MET DST)
Date: Mon, 9 Jul 2001 12:19:58 +0200
From: Xander Schrijen <Xander.Schrijen@phil.uu.nl>
Content-Type: text/plain;
	format=flowed;
	charset=us-ascii
Subject: Re: [SWIPL] OS X Woes
Cc: prolog@swi.psy.uva.nl
To: Jan Wielemaker <jan@swi.psy.uva.nl>
X-Mailer: Apple Mail (2.388)
In-Reply-To: <200107082122.f68LMlM04210@gollem.swi.psy.uva.nl>
Mime-Version: 1.0 (Apple Message framework v388)
Content-Transfer-Encoding: 7bit
Message-Id: <20010709102000.6A5E3AD59C@boole.admin.phil.uu.nl>

On Sunday, July 8, 2001, at 11:22  PM, Jan Wielemaker wrote:

>>> pl-wam.c:1707: illegal expression, found `&&'
>>
>> This isn't really harmfull.  It's the smart preprocessor being
>> too smart.  The compiler falls back on the tradiditional
>> preprocessor.  The "CC='cc -traditional-cpp'" bit on my page is
>> to make the compiler use the traditional preprocessor from the
>> start.
>
> What you see there is
>
> 	&&I_NOP_LBL,
> 	&&...
>
> Which is refers to a GCC-extension to pick the addresses of labels in
> the function.  This code should only be compiled if the system detects
> GCC version 2 and decides to use label-addresses as VM codes.  As far
> as I know no preprocessor should care about this.

I don't know exactly what's going on, but this if I use:

% cc -traditional-cpp -c -I. -I./rc -Wall -O2 pl-wam.c -o pl-wam.o

All goes well.  If I don't pass the -traditional-cpp flag I get 
a lot of 'illegal statement' errors and

cpp-precomp: warning: errors during smart preprocessing, 
retrying in basic mode

> Of course, it woes if configure detects gcc version 2 and the 
> actual compiler used has different characteristics.

Yeah.  I think the problem is that configure sometimes uses  the 
flag ("checking how to run the C preprocessor... cc -E 
-traditional-cpp"), probably also when testing for the gcc 
extension, but doesn't set CC to include it.


Xander.

