Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: C inconsistency? Summary: Just a missing semicolon Message-ID: <685@sdrc.UUCP> Date: 31 Mar 89 23:08:53 GMT References: <1989Mar30.192903.28426@gpu.utcs.toronto.edu> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 24 In article <1989Mar30.192903.28426@gpu.utcs.toronto.edu>, sarathy@gpu.utcs.toronto.edu (Rajiv Sarathy) writes: > Is this an inconsistency ?: > > struct element { > char *key; > int level; > struct element **fpointer; > } > struct element *head[LEVELCAP]; /* array of pointers to struct */ > > Microsoft C 5.1 in MS-DOS compiles this alright, but neither cc nor gcc are > able to compile in UNIX 4.1 (or is it 4.2, I can't remember). If you look real carefully, you will notice that there's no semicolon after the closing brace of the structure declaration. This is a syntax error that is ignored by some compilers and very badly diagnosed by others. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 "When all else fails, read the directions."