[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2019-02-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIRMED

[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2015-08-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 --- Comment #6 from Martin Sebor --- execl is a GCC builtin and GCC issues the -Wformat warning regardless of its declaration: $ cat t.c && ~/bin/gcc-5.1.0/bin/gcc -Wall t.c extern int execl (const char*, const char*, ...); int main (void) {

[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2015-08-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 --- Comment #5 from Jonathan Wakely --- Surely GCC only warns here because glibc adds the attribute to the execl declaration, so the bug is in glibc. GCC interprets the nonnull attribute to mean the argument *must* be non-null, and even optimise

[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2015-08-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 --- Comment #4 from Martin Sebor --- The requirements on execl() and main() are specified in sufficient detail to guarantee that a program that call execl("/some/other/program", (char*)0) is portable across all conforming implementations so long

[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2015-08-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 --- Comment #3 from Andrew Pinski --- And right before the quote you gave: "An application that relies on such a feature or behavior cannot be assured to be portable across conforming implementations." So this might not be a full requirement of

[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2015-08-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 --- Comment #2 from Martin Sebor --- Yes, that's the latest POSIX spec. The term "should" is defined in section 1.5 Terminology as: ... For an application, describes a feature or behavior that is recommended programming practice for optimu

[Bug c/67093] incorrect -Wnonnull text for execl family of functions

2015-08-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093 --- Comment #1 from Andrew Pinski --- POSIX says: The argument arg0 should point to a filename string that is associated with the process being started by one of the exec functions. At least from http://pubs.opengroup.org/onlinepubs/9699919799/f