Mail Archives: djgpp-workers/1998/06/16/09:03:50
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 -