This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hello, I'm using guile with C++ and I get compiler warnings using some gh functions; gh_enter & gh_new_procedureN_M. These are the warnings: mainGL.C:164: warning: ANSI C++ prohibits conversion from `(int, char**)' to `(...)' initGuile.C:47: warning: ANSI C++ prohibits conversion from `(long int)' to `(...)' For gh_enter and gh_new_procedure1_0 respectively. This is on linux with g++, on and SGI it refuses to compile. Is there any reason that the parameters aren't specfied in these instances? Even though they're often just converted away in the implementation. Using void gh_enter(int argc, char **argv, void (*c_main_prog)(int,char **)); instead of void gh_enter(int argc, char **argv, void (*c_main_prog)()); stops the warnings and adds some type safety. (Or am I doing something wrong?) Likewise with gh_new_procedure, eg. SCM gh_new_procedure0_0(char *proc_name, SCM (*fn)(void)); SCM gh_new_procedure1_0(char *proc_name, SCM (*fn)(SCM)); etc. Brad Bowman PS. For optional arguments 0_1, 0_2 do I just add a single SCM parameter?