Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!snorkelwacker.mit.edu!ira.uka.de!smurf!flatlin!ptavv!ralf From: ralf@ptavv.ka.sub.org (Ralf Wenk) Newsgroups: comp.os.minix Subject: ACK bug (may be ST only) Message-ID: <1991Apr24.234932.00992@ptavv.ka.sub.org> Date: 24 Apr 91 23:49:32 GMT Lines: 38 Tonight when I try to compile lharc.c of the lharc 1.02 package I got a misterious error message: "cc000962.s", line 13: too big Tracing this down to it roots I found that this part of a statement causes the generation of a number which does not fit into the assembler instruction it is assigned to. int days; days = 365 * ( year - 1970); This is because the statement is calculated as days = 356 * year - ( 365 * 1970 ); which is optimised by the compiler, regardless if the -O option is used or not, to days = 365 * year - 719050; ^^^^^^ is greater than 16 bit The code generator generates a sub.w #719050,d? instruction which is refused by the assembler as it should be. I do not know if this is only a ACK ST problem. You can easily test it with: main () { int days, year; year = 1991; days = 365 * ( year - 1970); pintf("days=%d\n", days ); } /* main */ -- -- Ralf Wenk -- ralf@ptavv.ka.sub.org