https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83520
--- Comment #3 from Touma Hatano <charo.ctf at gmail dot com> --- Sorry for misleading. My point was that if we can replace snprintf (program_name, sizeof (program_name), program_invocation_name); with snprintf (program_name, sizeof (program_name), "%s", program_invocation_name); , the program won't crash when program_invocation_name contains format specifiers. How do you think?