guile-devel
[Top][All Lists]
Advanced

[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: Thu, 22 Aug 2002 15:47:20 +0200
User-agent: Mutt/1.3.24i

Lars J. Aas <address@hidden> wrote:
: #ifdef LONG_BIT
: # define SCM_LONG_BIT LONG_BIT
: #else
: # define SCM_LONG_BIT (SCM_CHAR_BIT * sizeof (long) / sizeof (char))
: #endif

I boiled the problem down to this test failing:

  fprintf(stderr, "testing directly if -1 is <= sizeof(long) ");
  if ( -1 <= sizeof(long) ) fprintf(stderr, "true\n");
  else                      fprintf(stderr, "not so!\n");

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)))

  Lars J




reply via email to

[Prev in Thread] Current Thread [Next in Thread]