This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bugs in numbers.c (with patch)


Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:

> As we have learned by now, using void* is by far not sufficient to catch
> all misuses of SCM values.  The operators ==, !=, <, <=, >, >=, +, -, ++,
> -- can be performed on pointers.
> 
> Only looking for +, ++, -, --, <, <=, >, >=, !, I compiled guile with SCM
> typedef'd to union { struct { scm_bits_t n; } n; }.  This resulted in the
> following neat little list of suspicious error messages:

Good work!

Yes, our situation is that the old code, inherited from SCM, is
written without distinguishing types and levels.  We now introduce new
restrictions onto the code (which is a good thing), thus making bugs
out of code which was bug free without these restrictions.

Since we have the policy that the CVS Guile always should compile and
always be reasonably bug free, I have now disabled SCM_VOIDP_TEST in
the CVS version, thus reverting SCM back to the old definition as
`long'.

We will define SCM as `void *' (or something else) when we have the
situation under control again.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]