Xref: utzoo comp.lang.c:29990 comp.unix.ultrix:3837 Newsgroups: comp.lang.c,comp.unix.ultrix Path: utzoo!utgpu!watserv1!maytag!watdragon!watsol.waterloo.edu!tbray From: tbray@watsol.waterloo.edu (Tim Bray) Subject: enum handling by cc under ultrix V2 wrong? Message-ID: <1990Jun29.175209.16251@watdragon.waterloo.edu> Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes) Organization: University of Waterloo Date: Fri, 29 Jun 90 17:52:09 GMT Lines: 22 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@watsol.waterloo.edu