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