extern "C" and prototyping question
Bjørn Wennberg
Bjorn.Wennberg@lcc.no
Thu Apr 30 05:23:00 GMT 1998
Hi there!
I have a problem getting the following code snip to compile:
extern "C" {
void set_CB(void (*func)());
}
void exit_handler() {}
int main()
{
set_CB(exit_handler);
}
+++++
When compiling this with egcs-1.0.3-prerelease I get
warning: ANSI C++ prohibits conversion from `()' to `(...)'
If I do compile with -pedantic, the warning goes away. What is wrong
here?
bjornw>
------------------------------------------------------------------------
------------------------------------
Bjørn Wennberg email:
bw@lcc.no
Development Engineer, CellAD System 7 phone: +47 6797 8800
LCC Europe fax:
+47 6797 8801
More information about the Gcc
mailing list