Warning for unadorned 0 in varargs lists?
Gareth Pearce
tilps@probablyprime.net
Fri Aug 20 15:06:00 GMT 2004
> >
> > Yes, the attribute approach is better. But the particular function
> > that's giving me problems has a "type" like
> > int (*)(void*, int, int, [const char*, int]*, const char* = 0)
> > so it's not execl-like.
>
> But if there is such a prototype in scope, then a literal 0 argument will
> be cast to a const char*, even on a platform with 32-bit int and 64-bit
> pointers. So what is the problem? Does your code omit the prototype
> altogether and hope that the right thing happens?
It would be nice if the above prototype was possible to define in C...
More information about the Gcc
mailing list