Date: Tue, 16 Jun 1998 15:59:40 +0300 (IDT) From: Eli Zaretskii To: Vik Heyndrickx cc: Charles Marslett , djgpp-workers AT delorie DOT com Subject: Re: inb/outb In-Reply-To: <358652E8.20C2@rug.ac.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.