httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <p.richa...@elsevier.co.uk>
Subject Re: Fixing more compiler warnings/prototyping
Date Tue, 22 Oct 1996 13:52:50 GMT
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.

-- 
  Paul Richards. Originative Solutions Ltd.  (Netcraft Ltd. contractor)
  Elsevier Science TIS online journal project.
  Email: p.richards@elsevier.co.uk
  Phone: 0370 462071 (Mobile), +44 (0)1865 843155

Mime
View raw message