[gambit-list] Re: Gambit-C 4.0 beta 11

Bradley Lucier lucier at math.purdue.edu
Tue Oct 26 18:12:48 EDT 2004

On Monday, October 25, 2004, at 11:34  PM, Marc Feeley wrote:

>> Here are the error messages:
>> c:\Projects\Gambit\gambc40b11\lib\_num.c(52351): fatal error C1071:
>> unexpected end of file found in comment
>> I believe the problem is expressed in line 44720 of _num.c.
>> Here's that line:
>> ___SET_F64(___F64V2,___F64DIV(___F64V1,___F64UNBOX(___GLO(53,___G__23_ 
>> _23_bignum_2e_inexact_2d_mdigit_2d_base))))
>> I think what's going on is the ___F64UNBOX() is returning a string  
>> that
>> starts with '*' so the ___F64DIV expands to a string with '/*' in it.
>> Here's the definition of ___F64DIV:
>>      #define ___F64DIV(x,y)(x/y)
>> Changing this to
>>      #define ___F64DIV(x,y)(x/(y))
>> ... eliminates the error.  This same problem occurs in two other  
>> functions:
>>      #define ___F64INV(x)1.0/x
>>      #define ___FIXINV(x)___FIX((___FIX(1)/x))
>> I added parens around the x's and it compiles now.
> Great!  I suspected something like this was going on and I'm glad you
> pinpointed the problem.

Isn't the invariant supposed to be that each macro is supposed to  
return a fully parenthesized expression, so that you should change  
___F64UNBOX rather than ___F64DIV?

And what is ___FIXINV supposed to do?  The only definition or use in  
the entire Gambit source tree of ___FIXINV is a definition in gambit.h,  
so I think it should just be removed from gambit.h.


More information about the Gambit-list mailing list