Ultrix 3.0 (RISC) Compiler bug.

Tony Mason mason at goofy..Stanford.EDU
Sat Apr 29 12:53:04 AEST 1989


The RISC compiler fails to handle enumerated type comparisons correctly.  For
instance, the following code fragment generates warnings:

	{
		enum {a,b} x;
		int z;

		z = (a == b);
	}

generates a warning message on the assignment line claiming a type mismatch
(this causes expressions using logical operations to break inside if
statements.  Thus, "if((a == a) && (b == b))" won't work because the operands
of "&&" aren't integers (according to the compiler.))

Let me guess, it's fixed in the Mips 2.0 compiler, right? :-)

Tony Mason
Distributed Systems Group
Stanford University
mason at pescadero.stanford.edu



More information about the Comp.unix.ultrix mailing list