This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Warning for unadorned 0 in varargs lists?
- From: "Gareth Pearce" <tilps at probablyprime dot net>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 20 Aug 2004 23:30:41 +1000
- Subject: RE: Warning for unadorned 0 in varargs lists?
> >
> > 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...