Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site druny.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!drutx!druny!weh From: weh@druny.UUCP (HopkinsWE) Newsgroups: net.lang.c++ Subject: Re: are inlines static? Message-ID: <167@druny.UUCP> Date: Mon, 7-Apr-86 11:50:48 EST Article-I.D.: druny.167 Posted: Mon Apr 7 11:50:48 1986 Date-Received: Wed, 9-Apr-86 23:16:42 EST References: <34200014@orstcs.UUCP> Organization: AT&T Information Systems Labs, Denver, Co Lines: 36 Summary: names in file scope are extern by default In article <34200014@orstcs.UUCP>, nathan@orstcs.UUCP (nathan) writes: > static inlines: > > alice!ark claims that "inline" routines are not implicitly > static, unless declared otherwise. He/she may be right, in > the case of the existing compiler, but Rich Wales is right "by the > book". > > Read section r8.1 more closely: *everything* at the > top level is static unless declared otherwise. Section r8.1 is talking about storage class only, not name visibility. The pertinent sections are r4.1, which defines three kinds of scopes: local, file, and class. File scope is that for all objects declared outside of a block or class. It is visible after the point of declaration. Section r4.3 on linkage states that "A name of file scope that is not explicitly declared static is common to every file in a multi-file program; so is the name of a function. Such names are said to be external." > Doesn't the > existing compiler follow this? Mine behaves exactly as specified above (currently that distributed outside AT&T). Regarding inlines specifically, section r4.3 gives more details, but the nature of inlines are that they must be defined in each file where they are used, else the compiler couldn't possibly perform inline expansion. Bill Hopkins rm. 30G11 AT&T Information Systems Labs 11900 N. Pecos St. Denver, CO 80234 (303)538-4944 ihnp4!druny!weh