[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SCM_POSFIXABLE(-1) fails with MSVC++ 6.0
From: |
Lars J. Aas |
Subject: |
Re: SCM_POSFIXABLE(-1) fails with MSVC++ 6.0 |
Date: |
Fri, 23 Aug 2002 12:40:54 +0200 |
User-agent: |
Mutt/1.3.24i |
Lars J. Aas <address@hidden> wrote:
: Changing the alternative definition of SCM_LONG_BITS to cast the value
: to long like this works...
:
: # define SCM_LONG_BIT ((long)(SCM_CHAR_BIT * sizeof (long) / sizeof (char)))
Come to think of it, the cast is better placed on the inside so it's more
evident what is being done (stopping the unsigned-ness of the sizeof()-
operations to propagate incorrectly out through the macro invokation) so
it's not removed later by someone not knowing about this compiler bug.
# define SCM_LONG_BIT (SCM_CHAR_BIT * ((long) (sizeof (long) / sizeof (char))))
or s/long/int/ on the cast?
BTW, is anyone reading these mails? ;)
Lars J