Subject: Re: [SWIPL] OS X Woes

From: Xander Schrijen <[email-masked]>
Date: Mon, 9 Jul 2001 12:19:58 +0200

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.