www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/06/16/09:03:50

Date: Tue, 16 Jun 1998 15:59:40 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
cc: Charles Marslett <charles DOT marslett AT vlsi DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: inb/outb
In-Reply-To: <358652E8.20C2@rug.ac.be>
Message-ID: <Pine.SUN.3.91.980616155804.15902A-100000@is>
MIME-Version: 1.0

On Tue, 16 Jun 1998, Vik Heyndrickx wrote:

> > > void *p;
> > > void *r = foo_XQ (7, p);
> > 
> > Same here: add a prototype inside your source, or use explicit cast in
> > the call, and it *will* work.
> 
> If ``it will work'' means that it will compile without errors or
> warnings then you are right, but as a result of specifying the wrong
> prototype -as coded inline in the source-, the arguments will end up in
> the wrong order of the calling stack and as a result garbage is passed
> to foo_XQ (in my interpretetation that means ``it won't work''), since
> foo_XQ is a library function.

``Will work'' means will work, not only compile.

The point is that you can always supply a prototype which is missing, or 
use explicit casts to make things work, but you cannot override an 
existing prototype because the program won't compile.

- Raw text -


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