On Mon, 29 Jan 2018, Marek Polacek wrote:

> This warning is supposed to detect cases like 
> 
> void
> bar (char *d, unsigned n, const char *f, va_list va)
> {
>   vsnprintf (d, n, f, va);
> }
> 
> where the enclosing function is a candidate for the "format" attribute.  The
> code assumed that current_function_decl is never null -- a reasonable
> assumption since you can't have file-scope function calls in C, but as shown
> below, this assumption can be fooled using typeof.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to