Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!usc!elroy.jpl.nasa.gov!jarthur!uci-ics!rfg From: rfg@ics.uci.edu (Ronald Guilmette) Newsgroups: comp.lang.c++ Subject: Re: attention C++ Language Lawyers! Keywords: typedef, bitfield Message-ID: <26698DC3.9388@paris.ics.uci.edu> Date: 3 Jun 90 22:22:59 GMT References: <157@logo.procase.UUCP> Reply-To: rfg@ics.uci.edu (Ronald Guilmette) Organization: UC Irvine Department of ICS Lines: 16 In article <157@logo.procase.UUCP> roger@procase.UUCP (Roger H. Scott) writes: >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; This is illegal in ANSI-C and (by implication) also illegal in C++. All of your subsequent uses of the typename GlobalBit are also illegal because the typename itself was improperly declared. // Ron Guilmette (rfg@ics.uci.edu) // C++ Entomologist // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.