Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!think!ames!sri-spam!mordor!lll-lcc!lll-winken!csustan!helium!scott From: scott@helium.UUCP (Scott Hazen Mueller) Newsgroups: comp.sys.ibm.pc Subject: Re: 386 unix (was Re: 386 demand paged virtual memory) Message-ID: <185@helium.UUCP> Date: Fri, 25-Sep-87 12:07:40 EDT Article-I.D.: helium.185 Posted: Fri Sep 25 12:07:40 1987 Date-Received: Sun, 27-Sep-87 07:50:45 EDT References: <125@snark.UUCP> <299@nuchat.UUCP> <358@netxcom.UUCP> <158@splut.UUCP> <380@micropen> Reply-To: scott@helium.UUCP (Scott Hazen Mueller) Organization: City of Turlock, CA Lines: 103 In article <380@micropen> dave@micropen (David F. Carlson) writes: >Are there any beta sites that can confirm or deny these rather reasonable >claims? Has anyone *ever* had a demonstrable, verifiable compiler bug >with the Microport PCC-based compiler? >David F. Carlson, Micropen, Inc. Helium is a beta site for V/386. I found a *something* in the compiler. I wouldn't call it exactly a bug... Here's what I sent in: --- included text --- There seems to be a bug in the compiler or assembler. The following source code: typedef struct object { char posx, posy; char velx, vely; struct object *next, *prev, *contend; long energy; long mass; char type; char image; char strategy; char flags; } OBJECT; void their_smarts() { register OBJECT *obj; setimage(obj, (obj->velx *= -1) < 0 ? '>' : '<'); } compiles to the following assembler code: .file "yukfoo.c" .version "02.01" .data .text .align 4 .def their_smarts; .val their_smarts; .scl 2; .type 040; .endef .globl their_smarts their_smarts: pushl %ebp movl %esp,%ebp pushl %eax pushl %edi leal 2(%edi),%eax movl %eax,-4(%ebp) movl %eax,%edx imulb $255,(%edx),%dl movb %dl,(%eax) testb %dl,%dl jge .L16 movl $62,%eax .L17: pushl %eax pushl %edi call setimage addl $8,%esp /ASMQ movl -8(%ebp),%edi /ASMEND0 leave ret .L16: movl $60,%eax jmp .L17 .align 4 .def their_smarts; .val .; .scl -1; .endef .data .text and then the compilation terminates with the error Assembler: yukfoo.c aline 16 : syntax error The compiler is invoked with "cc -c -O yukfoo.c" on the included source. The assembly source was produced with "cc -c -O -S yukfoo.c". --- end included text --- (Note: the source code was from Larry Wall's "warp" game...) Reply received: --- more included text --- I've reported the problem to our 386 group and they have reproduced the problem. We're checking to see if it's still a problem in the 2.0 release of V/386 rel 3. Date: Wed, 29 Jul 87 10:40:18 PDT Subject: C bug & Build disk C bug: It turns out that the *= operator is not supported. This is what's been causing you all the grief. The work-around should be pretty simple. --- end inclusion --- The fix worked; however, I wouldn't call non-support of a standard operator just a bug. "It aint' C" :-) \scott -- Scott Hazen Mueller City of Turlock 901 S. Walnut Rd. Turlock CA 95380 (209) 668-5590 lll-crg!csustan!helium!scott uunet!zorch!helium!scott