This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33403] New: "warning: missing sentinel in function call" for 0 rather than NULL
- From: "rcrocomb at ieee dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Sep 2007 23:38:28 -0000
- Subject: [Bug c++/33403] New: "warning: missing sentinel in function call" for 0 rather than NULL
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Actual version is: gcc (GCC) 4.2.1 (Debian 4.2.1-5)
It seems unexpected that compiling the following gives a warning for the case
where '0' is passed as the sentinel rather than NULL.
#include <unistd.h>
int
with_null(void)
{
return execlp("ls", "ls", "-l", NULL);
}
int
with_0(void)
{
return execlp("ls", "ls", "-l", 0);
}
$ g++ -Wall -c test.cpp
test.cpp: In function 'int with_0()':
test.cpp:12: warning: missing sentinel in function call
--
Summary: "warning: missing sentinel in function call" for 0
rather than NULL
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rcrocomb at ieee dot org
GCC build triplet: Same
GCC host triplet: x86_64-linux-gnu
GCC target triplet: Same
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33403