Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!vsi1!wyse!mips!rogerk From: rogerk@mips.COM (Roger B.A. Klorese) Newsgroups: comp.unix.ultrix Subject: Re: Ultrix 3.0 (RISC) Compiler bug. Message-ID: <18555@servitude.mips.COM> Date: 30 Apr 89 18:25:32 GMT References: <8829@polya.Stanford.EDU> Reply-To: rogerk@servitude.mips.COM (Roger B.A. Klorese) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 26 Summary: In article <8829@polya.Stanford.EDU> mason@goofy.Stanford.EDU (Tony Mason) writes: >The RISC compiler fails to handle enumerated type comparisons correctly. >Let me guess, it's fixed in the Mips 2.0 compiler, right? :-) Actually, that's a good guess... As our C compiler is based on an early (pre-enums) PCC, when we chose to implement enums, we had a choice of three models, either (a) treating them as pointers, (b) treating them as integers, or (c) treating them as a new derived type. Up intil the 2.0 release, we have treated them as a derived type, which prohibits some operations. As of 2.0, we treat them as integers. % [rogerk] 101) cc1.31 foo2.c ccom: Warning: foo2.c, line 6: enumeration type clash, operator = z = (a == b); ------------------------------^ % [rogerk] 102) cc2.0 foo2.c % [rogerk] 103) This release has recently been shipped to DEC as input for their poritng process. -- Roger B.A. Klorese MIPS Computer Systems, Inc. {ames,decwrl,pyramid}!mips!rogerk 928 E. Arques Ave. Sunnyvale, CA 94086 rogerk@servitude.mips.COM (rogerk%mips.COM@ames.arc.nasa.gov) +1 408 991-7802 "I want to live where it's always Saturday." -- Guadalcanal Diary