Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!cs.utexas.edu!usc!apple!voder!procase!roger From: roger@procase.UUCP (Roger H. Scott) Newsgroups: comp.lang.c++ Subject: attention C++ Language Lawyers! Keywords: typedef, bitfield Message-ID: <157@logo.procase.UUCP> Date: 1 Jun 90 07:14:12 GMT Reply-To: roger@procase.UUCP (Roger H. Scott) Organization: PROCASE Corp., Santa Clara, CA Lines: 24 Okay all you language lawyer types, here's a fun one for you. Which, if any, of the following are legal? Which, if any, should be? Why? typedef unsigned GlobalBit : 1; GlobalBit ASingleBit; GlobalBit AnArrayOfBits[6]; // shave and a hair cut, ... struct { GlobalBit aBitMember; GlobalBit anArrayOfBitsMember[6]; } AStructContainingVariousGlobalBits; struct { typedef unsigned StructBit : 1; StructBit aBitMember; StructBit anArrayOfBitsMember[6]; } AStructContainingVariousStructBits; If you like fireworks try feeding this stuff to cfront. I'd be curious to hear what g++'s reaction to this code is.