httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Fixing more compiler warnings/prototyping
Date Tue, 22 Oct 1996 13:11:08 GMT
Paul Richards wrote:
> 
> Ben Laurie <ben@gonzo.ben.algroup.co.uk> writes:
> 
> > Paul Richards wrote:
> > > 
> > > Ben Laurie <ben@gonzo.ben.algroup.co.uk> writes:
> > > 
> > > > What is the point of prototyping a private function in a header?
> > > 
> > > So it's the same place as the non-private headers and to remove
> > > clutter from the file with the actual code in it.
> > 
> > Are you trying to wind me up?
> 
> No!
> 
> Was the question "what is the point of prototyping private functions"
> or "why put them in a header" ?
> 
> I answered the latter, I'll now answer the former.
> 
> If someone inadvertantly tries to use a static function because they
> didn't realise it was static then the compiler will give a detailed
> error listing the file and line number of its use if there is a
> prototype. If there is not then you'll just get the symbol error at
> link time. Unresolved symbol errors at link time aren't as simple to
> track down and fix as compile time errors.

Now you've lost me. If it's prototyped surely there will be no error? If there
is no prototype then at least you will get a warning (that you used an
un-prototyped function).

Cheers,

Ben.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message