https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67093
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Status|UNCONFIRMED
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) {
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
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
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
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
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