GCC 2.95.3
While porting an interrupt handler from QNX 4.25, to Neutrino 6.2.0(NC),
GCC identifies a candidate function, but does not select it.
From the header file:
MyClass
{
MyClass ();
~MyClass ();
void SetupIsr(int irqLevel);
…
private:
struct sigevent event;
const struct sigevent *MyIsr (void *arg, int id);
}
From the implementation file:
const struct sigevent *MyClass::MyIsr(void *arg, int id)
{
…
event.sigev_notify = SIGEV_INTR;
return (&event);
}
// Attach the interrupt handler to the given hardware interrupt level:
void MyClass::SetupIsr(int irqLevel)
{
// Enable I/O privity
ThreadCtl (_NTO_TCTL_IO, 0);
irqID = InterruptAttach (interruptLevel, (MyIsr), NULL, 0, 0);
}
Compiler Messages:
…/my_class.cpp: no matches converting function MyIsr' to type
const
struct sigevent * (*)(void *, int)’
…/my_class.cpp: candidates are: const struct sigevent *
MyClass::MyIsr(void *, int)
So, if GCC has identified the correct function, why did it generate
an error instead of selecting it?
Ideas?
-GF