xmame  

Re: Insignificant unofficial b10 bug

Pete French
Tue, 12 Dec 2000 14:58:54 -0800

> That's not actually changing the way 'if' works.  ! is shorthand for a
> comparison with zero, in a comparison zero will be cast to a pointer, and
> when zero is cast to a pointer the compiler has the opportunity to replace
> the value with any constant illegal-pointer-value it chooses.  That's why
> you need to use a zero cast to a pointer in situations where the compiler
> can't do it automatically.

very true - but if zero is a valid retrun from malloc then you cant do
that, (as this would break x = mmaloc(y) where malloc returned zero).

I suspect the easiest solution was to make malloc waste memory and not
allocate a block that would cross zero. Annoyiung, but I cant see any other
practical solution sadly.

> '(INT_MAX - (INT_MAX >> 1))' should work for all the integer representations

well, if youve got INT_MAX then you probably have INT_MIN and can use that.
I was truing to do it language wise by finding a way to set the top bit of an
integer and no others. (which should come out to MIN_INT).

Whilsyt we are on the subject of compilers - does anyone else out there test
next relkeases of xmame against older compilers to check for things that have
broken ? I just tried to build the new release against gcc 2.7.2 and came
across a couple of things that have broken since 7.1 I have made patches
for these (or will be doing so later this evening). Anybody got any idea how
easy it will be to get these integrated back into the MAME core ? Hans, do
you have a contact for the core team that you use for submitting xmame core
patches back to them with ?

cheers,

-bat.
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]