A new (to me) bug in /bin/cc

Kevin O'Gorman kevin at kosman.UUCP
Sat Jun 25 18:17:41 AEST 1988


Yuk!!

I just got the game Nethack, version 2.3, and went to compile this beast.
The make died on the first real source, with an error from *the assembler*!!!

Seems that /bin/cc was putting out 'br.b' instructions when it had no good
reason to think that the destination was close enough.  The assembler had
no choice but to choke.  I looked around, and the problem seemed to be an
assignment to a structure element in a conditional, in such a way that the
next thing to do was leave the current function.  The end of the function
was quite far away.

The problem went away if I set it up to not compile things into bitfields
(this is controlled by the config.h file).

So, the bug has something to do with bitfields in structures.

My questions is: does gnu cc do any better??

Anyone out there compiled nethack with gcc, and selected bitfields???



More information about the Unix-pc.general mailing list