Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!portal!cup.portal.com!Tim_CDC_Roberts From: Tim_CDC_Roberts@cup.portal.com Newsgroups: comp.lang.c Subject: Re: C inconsistency? Message-ID: <16508@cup.portal.com> Date: 31 Mar 89 19:28:49 GMT References: <1989Mar30.192903.28426@gpu.utcs.toronto.edu> Distribution: na Organization: The Portal System (TM) Lines: 33 In <1989Mar30.192903.28426@gpu.utcs.toronto.edu>, Rajiv Sarathy writes: > struct element { > char *key; > int level; > struct element **fpointer; > } > struct element *head[LEVELCAP]; /* array of pointers to struct */ > > cc merely gives a "syntax error at or near" the line having the array > declaration. > > gcc, however, complains that "two or more data types in declaration" exist (at > the line having the array declaration). > > Any ideas why? I know! I know! The Tim Roberts visual unoptimizing C precompiler gives the following error message: struct element { char *key; int level; struct element **fpointer; } ******* ^ Missing Semicolon In Declaration. Probable Havoc Follows. struct element *head[LEVELCAP]; /* array of pointers to struct */ Microsoft C also barfs on this. I suspect that the semicolon got deleted in transition. Tim_CDC_Roberts@cup.portal.com | Control Data... ...!sun!portal!cup.portal.com!tim_cdc_roberts | ...or it will control you.