Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!okstate.UUCP!uok.UUCP!ricmtodd From: ricmtodd@uok.UUCP Newsgroups: net.lang.c Subject: Re: static arguments Message-ID: <3400005@uok.UUCP> Date: Wed, 4-Jun-86 14:47:00 EDT Article-I.D.: uok.3400005 Posted: Wed Jun 4 14:47:00 1986 Date-Received: Mon, 9-Jun-86 03:06:03 EDT References: <170@njitcccc.UUCP> Lines: 34 Nf-ID: #R:njitcccc.UUCP:170:uok.UUCP:3400005:000:1312 Nf-From: uok.UUCP!ricmtodd Jun 4 13:47:00 1986 /* Written 5:46 pm May 30, 1986 by ron@njitcccc.UUCP in uok.UUCP:net.lang.c */ >The question is, are static arguments legal even though they make no sense? >If not, why doesn't the compiler flag the problem? If they are legal, have >we discovered a bug in our linker? > >Thanks in advance for any enlightening information. >-- >Ron DeBlock >New Jersey Institute of Technology >Computerized Conferencing and Communications Center >Newark, NJ 07102 > > uucp: ...!allegra!bellcore!njitcccc!ron > ...!andromeda!njitcccc!ron > arpa: njitcccc!ron@bellcore.arpa > bitnet: ron%njitcccc.bitnet /* End of text from uok.UUCP:net.lang.c */ Quoting from Appendix A of Kernighan and Ritchie, p. 203, about argument lists: "The only storage class which may be specified is register; . . ." Thus static arguments are indeed illegal. A couple of quick tests show that both the compiler on uok (BSD 2.9) and the compiler on my PC (Aztec C) object to static declared arguments. The BSD UNIX compiler gives: temp.c:1: Conflict in storage class temp.c:1: x redeclared Aztec C gives an "Internal Error" message. Not very informative, but it does at least point a caret at the offending declaration. Richard Todd {allegra!cbosgd|ihnp4}!okstate!uokvax!uok!ricmtodd