------- Additional Comments From ghazi at gcc dot gnu dot org 2005-07-14 18:49
-------
Here's another case we should catch, passing a function pointer as a parameter:
#include <stdio.h>
static void foo (int (*ptr)(const char *, ...))
{
ptr("hello world %d\n", 5L);
}
int main (void)
{
foo (printf);
return 0;
}
In this code GCC should see that the argument 'ptr' to function 'foo' is being
passed something with a format attribute set. I suspect this is handled
elsewhere in the compiler than the assignment operator in my first example.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22476