This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] analysis of global statics and removal associated vdefsand vuses
Kenneth Zadeck wrote:
Is it possible to notice this by looking at the format string? Given
that we have a pass that parses this string and produces messages when
the args do not match, can we just look for non standard formats (with
the obvious caveats that if we do not see the string, we have to
assume the worst...)
No; you are specifically allowed to redefine the meanings of the
built-in formats like "%d". And the registration of such redefinitions
occurs by calling a function (register_printf_function) rather than as
part of the call of printf itself. So, with GNU libc, you just can't do
what you want, sadly.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com