enum handling by cc under ultrix V2 wrong?

Tim Bray tbray at watsol.waterloo.edu
Sat Jun 30 03:52:09 AEST 1990


Am porting a big application to a decsystem 3100 running ultrix V2.something;
the cc compiler complains about the following things:

1. The type 'void *' as a formal function parameter
2. The type 'void *' as a member of a union within a structure
3. Bitwise OR of enums (enum {e1, e2} foo; int set; set = e1 | e2;)
4. Bitwise AND of enums (enum {e1, e2} foo; int set; set = e1 & e2;)
5. enums as array indices (enum {e1, e2} foo; int x, y[3]; x = y[e1];)

These all seem like gross violations of both common sense and of the ANSI
C standard as I read it in K&R V2.  In particular, there seems no excuse
for the refusal to deal with enums as stated.

Questions:

1. Am I insane, and the compiler correct?
2. Wil moving up to the most recent v3.whatever of ultrix correct this?

Apologies if this has been beaten to death here.  If so, flames by mail
please.

Tim Bray, Open Text Systems, Waterloo, Ont. tbray at watsol.waterloo.edu



More information about the Comp.unix.ultrix mailing list