This is the mail archive of the gcc-patches@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: [c++] warn if NULL is passed through varargs


>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:

Kaveh> I ask because variadic function uses such as:
>> concat (blah, blah, NULL)
Kaveh> are ubiquitous in GCC and there have been no complaints or bug
Kaveh> reports AFAIK.  (There are probably other examples too.)

I understand there are programs in the typical Linux distribution that
use the equivalent of concat (blah, blah, 0).
It would be nice to be able to warn about this on architectures where
sizeof(int) != sizeof(void*).  Likewise it would be nice to get
warnings about a missing trailing `NULL' for functions like execl,
just like we get warnings about printf format/argument mismatches.

Tom


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