Hi, with gcc 4.1.0 under Linux I get the following error when all warnings are turned on: gcc -O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -MT glplib05.lo -MD -MP -MF .deps/glplib05.Tpo -c glplib05.c -fPIC -DPIC -o .libs/glplib05.o glplib05.c: In function '_glp_lib_print_hook': glplib05.c:151: error: ISO C forbids conversion of function pointer to object pointer type glplib05.c:151: error: ISO C forbids initialization between function pointer and 'void *'
When I change line 151 of glpklib05.c from int (*hook)(void *, const char *) = (void *)func; into int (*hook)(void *, const char *) = (int(*)(void*, const char*))(func); then it works fine. (Hope its correct. I always get confused with function-pointers.) Best, Stefan _______________________________________________ Bug-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-glpk
