This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Bugs in numbers.c (with patch)
- To: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Subject: Re: Bugs in numbers.c (with patch)
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 23 Mar 2000 14:16:09 +0100
- Cc: Guile Mailing List <guile at sourceware dot cygnus dot com>
- Cc: djurfeldt at nada dot kth dot se
- References: <Pine.LNX.4.21.0003230001070.12383-100000@marvin.ida.ing.tu-bs.de>
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.