Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!tektronix!teklds!zeus!bobr
From: bobr@zeus.UUCP (Robert Reed)
Newsgroups: comp.lang.c
Subject: Re: ANSI C -- static forward references
Message-ID: <1008@zeus.UUCP>
Date: Wed, 17-Dec-86 15:01:38 EST
Article-I.D.: zeus.1008
Posted: Wed Dec 17 15:01:38 1986
Date-Received: Thu, 18-Dec-86 21:15:30 EST
References: <108@decvax.UUCP> <5455@brl-smoke.ARPA>
Reply-To: bobr@zeus.UUCP (Robert Reed)
Organization: CAE Systems Division, Tektronix Inc., Beaverton OR
Lines: 25

Given that relying on the interplay between "static" and "extern" falls into
the cracks between what should be in the standard and what is conventional
practise, it is reasonable to ask:  Does the standard provide a mechanism
for forward referencing functions?  (Not having a copy of the standard, I
can't answer this myself).  I know I can predeclare functions in most
conventional implementations but having to insert two declarations which
include type information, e.g.:

    static char *foo();

    biz()
    {
    	foo();
    }

    static char *foo()
    {

    }

seems to be a potential source of errors because of the duplicated type
declaration.  Though the static/extern technique may be a hack, Martin's
need seems reasonable.
-- 
Robert Reed, Tektronix CAE Systems Division, bobr@zeus.TEK