Is it possible to declare a function as static and with external connection "C" in one line?
For example, with GCC, I can do this:
extern "C" {
static void MyHandler (void)
{
}
}
And he does exactly what I want to do.
For aesthetic reasons, I no longer like the extern "C" {} block.
I can also write:
extern "C" void MyHandler (void) { ...
or
static void MyHandler (void) { ...
but if I combine them, then none of the following two works:
extern "C" static void MyHandler (void) {...
static extern "C" void MyHandler (void) {...
Q: Is there a way to combine two link modifiers without using an explicit “C” extern block?
source
share