Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!axion!rtf.bt.co.uk!grundy From: grundy@rtf.bt.co.uk (Martin Grundy) Newsgroups: comp.os.minix Subject: c386 - problem with NOFLOAT Message-ID: <1991May3.133443.23618@rtf.bt.co.uk> Date: 3 May 91 13:34:43 GMT Organization: BT Customer Systems, Brighton, UK Lines: 57 Hi all... I have recently upgraded to Minix-386 (thanks Bruce :-) with no problems and thought I would try CvWs c386, which I have grabbed of the net when it was posted back in January, together with Patches 1 and 2. My access to news is via a Sequent S27, and anything I save, I keep there as its backed up. I also uudecode/uncompress it on this machine. I have successfully patched and compiled c386 on the Sequent with two exceptions. 1. In gen386.c. At PL1, the statement:- ap2=&ecx_reg; occurs at line 838 in function g_asdiv(). The Sequent's C compiler, (which is BSD I believe) gives a warning that an "old style assignment" has been used and that it has assumed a "&=" was meant. Given that ap2 is of type "struct amode *", I assume that the statement should read:- ap2 = &ecx_reg; This problem may not occur on Minix ACK, bcc or Gnu-C :-) 2. Having transferred the sources to my Minix-386 box, I tried to compile c386 under bcc. The first thing was bcc objected as it has no floating point, (or perhaps it is the lack of a 387 ?). I patched the Makefile to include -DNOFLOAT. Then, on line 1688 of gen386.c (PL1) gendouble(node->v.f); bcc said that "f" was undefined. Looking at the definition of struct enode in expr.h, I found this:- union { long i; #ifndef NOFLOAT double f; #endif char *sp; struct enode *p[2]; } v; ie. with NOFLOAT defined, double f; is missing. Has any one else found this problem ? -------------------------------------------------------------------- Martin Grundy | email: grundy@rtf.bt.co.uk British Telecom Customer Systems | Hyperion House | phone: +44 273 762102 96-99 Queens Road | fax: +44 273 722038 or Brighton BN1 3XF. | +44 273 762071 (netfax)