From: <lm...@bi...> - 2009-05-17 00:47:31
|
> Be careful with bitfields, in ANSI C you have to specify signed or unsigned > explicitly, else the sign is undefined and you may get unexpected results > (e.g overflows when a refcount drops below zero). > > So you want: > > + signed int refCount:31; /* When 0 the object will be freed. > */ So that one I can agree with, thanks. > + signed int undef:1; /* Used by L to mark an object as but a one bit thing that is signed seems strange :) But point taken, I'll tweak our source base. Thanks for the feedback. -- --- Larry McVoy lm at bitmover.com http://www.bitkeeper.com |