This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

extern "C" and prototyping question


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]