Xref: utzoo comp.lang.c:14177 comp.std.c:494 Path: utzoo!attcan!uunet!husc6!uwvax!umn-d-ub!nic.MR.NET!hal!cwjcc!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c,comp.std.c Subject: Re: ANSI grammar questions Message-ID: <10733@haddock.ima.isc.com> Date: 17 Nov 88 18:27:40 GMT References: <7938@bloom-beacon.MIT.EDU> <179@twwells.uucp> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Followup-To: comp.std.c Organization: Interactive Systems, Boston Lines: 19 In article <179@twwells.uucp> bill@twwells.uucp (T. William Wells) writes: >In article <7938@bloom-beacon.MIT.EDU> chekmate@athena.mit.edu (Adam Kao) writes: >>So you can stack any number of storage_class_spec, type_spec, and type_qual >>in front of your declaration, in any order? Things like: >> void static fn(); >> void static extern int auto volatile fn(); > >Right. This is intentional. Believe it or not, there are situations >where this flexibility is useful. As I'm sure we all realize, the second is *not* legal C (it names two conflicting types, and three conflicting storage classes). More precisely, although it satisfies the syntax rules, it violates the constraint rules. Less well known, but perhaps of interest to y'all, is that the first construct, though still legal, is obsolescent. Don't use it in new programs. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint Followups to comp.std.c.