[comp.sys.atari.st] moria stuff

saj@chinet.UUCP (Stephen Jacobs) (09/03/88)

Steve Grimm has the whole executable now.  Unfortunately, he has to test it,
and having been victimized by this game myself, I'm afraid that may mean the
end of the sources and binaries newsgroups.  Some of you may be interested
in a couple of bugs I found in Mark Williams C 3.0.6 (and promptly reported,
so they should be fixed in the next release).  Consider:
foo(junk)
char junk;
{bar(&junk);}
junk, assuming the caller of foo knows it as a char also, is pushed on the
stack as an int.  &junk turns out to be a pointer to the extra char which
pads out junk to int length.  I dislike this programming practice anyway, so
the useless interpretation is no biggie.  Next:
foo(junk)
register long junk;
{return junk & 0x01000000L;}
The mask operation is quite reasonably compiled as a bit test instruction, but
for a long mask with the active bit in the high order half, the wrong bit is
tested.  Better practice than the first one, but still pretty obscure.