www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/06/12/12:25:36

Message-ID: <3581566D.A3E0262A@vlsi.com>
Date: Fri, 12 Jun 1998 09:25:17 -0700
From: Charles Marslett <charles DOT marslett AT vlsi DOT com>
MIME-Version: 1.0
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
CC: DJ Delorie <dj AT delorie DOT com>, nate AT cartsys DOT com, djgpp-workers AT delorie DOT com
Subject: Re: inb/outb
References: <199806112347 DOT TAA11699 AT delorie DOT com> <3580FC0A DOT 4D10 AT rug DOT ac DOT be>

Vik Heyndrickx wrote:
> 
> DJ Delorie wrote:
> >
> > > The `inb' and `outb' functions are missing their prototypes in <pc.h>.
> > > Here is a patch.
> >
> > Beware - some prototypes are left out of headers because various
> > systems have conflicting definitions of them.  xmalloc, for example,
> > is defined different ways in different GNU packages, and none expect
> > the system headers to have them.
> 
> If I'm correct, the compiler assumes the default when a prototype is
> omitted. Since the default is ``int'', isn't omitting a prototype
> equally as bad as providing some prototype?

Not quite.  If you provide a prototype, then you cannot override
it with another (or I don't know how you undef a prototype).  While
if you omit the prototype, you can define it later so long as the
function is not referenced before the prototype definition.

> --
>  \ Vik /-_-_-_-_-_-_/
>   \___/ Heyndrickx /
>    \ /-_-_-_-_-_-_/  Knight in the Order of the Unsigned Types

--Charles

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019