GCC mistakenly identifies a named parameter as a sentinel. Given the following program, compiling with -Wformat GCC should warn about a missing sentinel on the line indicated:
#include <stddef.h> extern void foo (const char *, ...) __attribute__ ((__sentinel__)); void bar (void) { foo (NULL); /* missing warning!! */ foo ("hello", NULL); /* clean */ } When looking for the sentinel, GCC should skip over the named arguments first before attempting to locate the NULL pointer. -- Summary: named parameter mistakenly identified as sentinel Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ghazi at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21911