Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: Proper use of "extern" ... Message-ID: <1353@brl-smoke.ARPA> Date: Sun, 15-Jun-86 01:27:44 EDT Article-I.D.: brl-smok.1353 Posted: Sun Jun 15 01:27:44 1986 Date-Received: Sat, 21-Jun-86 07:38:05 EDT References: <223@comp.lancs.ac.uk> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 28 In article <223@comp.lancs.ac.uk> david@comp.lancs.ac.uk (David Coffield) writes: - static void f() - { - g(); - } - - static void g() - { - } - -At the top of this file do we put - -a) static void g() or - -b) extern void g()? I would put static void g(); The rationale is that "extern" would imply that the name "g" is to be "published", so that it would be visible outside this file module. Since this is not what is wanted, "extern" is inappropriate. Note that existing compilers do not all agree on the scope or meaning of extern declarations in cases like this. The X3J11 standard is expected to clarify these semantics.