guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more compilation failures: -DSCM_DEBUG_TYPING_STRICTNESS=2


From: Ken Raeburn
Subject: Re: more compilation failures: -DSCM_DEBUG_TYPING_STRICTNESS=2
Date: Tue, 1 Sep 2009 18:29:42 -0400

On Sep 1, 2009, at 15:47, Ludovic Courtès wrote:
Compiling with SCM_DEBUG_TYPING_STRICTNESS=2 as discussed in __scm.h

Another compilation flag that must be rarely used.  :-)

Do you find it useful?

Not so far. :-) There seems to be a lot of otherwise correct code making assumptions about using casts or "==" or whatever; I haven't sorted out whether there are actual bugs being flagged in there too.

The corresponding code in Emacs has helped me track down code that was being sloppy about mixing integers and Lisp values, and that was good, since I'm trying to change things so that integers represented in Lisp have bit patterns different from the integers themselves, so you really need to make the distinction. But IIRC it took a while to make it work again, because nothing was really using it when I started poking at it.

In the Guile case, I'm a tiny bit concerned about some of the pointer/ int games played (e.g., I'm pretty sure C99 does not guarantee that you can convert an arbitrary uintptr_t value to pointer and back and be guaranteed of getting the original value... but I don't know of a platform that actually violates that assumption), but only a tiny bit.

My preference is for #2 because: (1) I've never used it ;-), and
(2) we're moving away from C anyway.  Hmm, weak arguments maybe.

Anyway, in the meantime, we can conditionalize static initialization
stuff from bdw-gc-static-alloc on STRICTNESS == 0 and keep everyone
happy.

Does that sound reasonable?

Sure. Actually, STRICTNESS=1 is the default -- 0 makes SCM an integer, 1 makes it a pointer to a struct, which adds a little more type safety, and 2 makes it a union, which breaks casting, initialization, etc.

It looks like the eval code is going to be annoying too

I wouldn't worry much about this one either as its probably doomed, once
Andy's eval cleanup work is mature.

Things have been moving too fast lately!

I'm not going to complain about that! :-)

Ken



reply via email to

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