This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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... 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]