Subject: attributes on pointed-to functions?
To: None <tech-toolchain@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-toolchain
Date: 09/26/2002 11:42:34
Is there anyone here wizardly enough wth gcc to know how to attach
attributes to a function named only by a pointer?

void foo(struct something *arg, void (*fn)(const char *, ...))

I'd like the function pointed to by fn to be tagged with an attribute
(specifically, a format-string attribute, so -Wformat can check calls
to it).  But all my attempts have ended up attaching the attributes to
the `fn' argument formal itself, which is not a function and hence
can't take a format attribute.  extend.texi is silent on how to attach
attributes to functions that don't themselves have names, as far as I
can see....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B