Can I declare a function as static and with extern "C" linkage in one line?
E.g, with GCC I can do this:
extern "C" {
static void MyHandler (void)
{
// some code here
}
}
And it does exactly what I want it to do.
For aesthetic reasons I don't like the extern "C" {} block however.
I can also write:
extern "C" void MyHandler (void) { ...
or
static void MyHandler (void) { ...
but if I combine them neither of the following two seem to work:
extern "C" static void MyHandler (void) {...
static extern "C" void MyHandler (void) {...
Q: Is there a way to combine the two linkage modifiers without using an explicit extern "C" block?