Warning (Anachronism): Assigning void(*)(int) to extern “C” void(*)(int)
问题 I'm having trouble with Sun's C++ compiler. I've read Oracle's Working with Pointers to Functions [from C++]. Its a good read, and I get the impression SunCC is most compliant among all the compilers in this area (though its causing me trouble). The test code is below, and line 24 is new_handler.sa_handler = (pfn ? pfn : &SignalHandler::NullHandler); . Unrolling the ternary operator shows this is the issue: new_handler.sa_handler = pfn; . SunCC 5.11 $ /opt/solstudio12.2/bin/CC test.cxx "test