This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
extern "C" and prototyping question
- To: "'egcs at cygnus dot com'" <egcs at cygnus dot com>
- Subject: extern "C" and prototyping question
- From: Bjørn Wennberg <Bjorn dot Wennberg at lcc dot no>
- Date: Thu, 30 Apr 1998 14:26:26 +0200
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