Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!ukma!nrl-cmf!ames!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!lzaz!lznv!psc From: psc@lznv.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.sys.ibm.pc Subject: Re: Problems with MSC 5.0 Message-ID: <1203@lznv.ATT.COM> Date: Tue, 24-Nov-87 13:29:39 EST Article-I.D.: lznv.1203 Posted: Tue Nov 24 13:29:39 1987 Date-Received: Sat, 28-Nov-87 10:43:31 EST References: <754@pilchuck.Data-IO.COM> <1610047@hpcvlo.HP.COM> Organization: AT&T Lines: 22 Summary: never should have worked In article <1610047@hpcvlo.HP.COM>, jason@hpcvlo.HP.COM (Jason Su) writes: > /* Here's another irritating bug that compiled(!) w/o errors on MSC 4.0. */ > typedef int map; > > typedef struct { > int *map; /* <-- This is the error line */ > } my_struct; K&R, p. 200: "Declarations whose 'storage class' is typedef do not define storage, but instead DEFINE IDENTIFIERS WHICH CAN BE USED LATER AS IF THEY WERE TYPE KEYWORDS . . ." [emphasis mine] The identifier "map" is effectively a reserved keyword from the time its typedef is complete through the end of the compiled module. MSC 4.0 was incorrect in accepting this code in the first place. I suspect that most C compilers that support typedef will reject it. -Paul S. R. Chisholm, {ihnp4,cbosgd,allegra,rutgers}!mtune!lznv!psc AT&T Mail !psrchisholm, Internet psc@lznv.att.com I'm not speaking for my employer, I'm just speaking my mind.