Hello, I am almost certain that the C standard allows you to assign a void* return value to any other pointer type.
There are also good reasons for not casting the return value of the alloc functions, see: http://www.c-faq.com/malloc/mallocnocast.html Is it possible that your compiler is operating in C++ mode? I believe in C++ you need to cast the alloc call. But in straight C you do not. Patrick On Wed, Apr 09, 2008 at 10:41:24AM +0200, Martin Drews wrote: > Hi, > > I am trying to build GSL 1.10 in a PGI (Portland) compiler environment > without shared libraries, and I am getting the following error, which I > believe is a code bug: > > ... > Making all in eigen > make[2]: Entering directory `/homedirs/home/mad/gsl/gsl-1.10/eigen' > /bin/sh ../libtool --tag=CC --mode=compile CC -DHAVE_CONFIG_H -I. -I.. > -I.. -g -c -o gensymm.lo gensymm.c > CC -DHAVE_CONFIG_H -I. -I.. -I.. -g -c gensymm.c -o gensymm.o > /opt/xt-pe/2.0.41/bin/snos64/CC: INFO: linux target is being used > "gensymm.c", line 58: error: a value of type "void *" cannot be assigned > to an > entity of type "gsl_eigen_gensymm_workspace *" > w = calloc (1, sizeof (gsl_eigen_gensymm_workspace)); > ^ > > 1 error detected in the compilation of "gensymm.c". > make[2]: *** [gensymm.lo] Error 1 > make[2]: Leaving directory `/homedirs/home/mad/gsl/gsl-1.10/eigen' > ... > > Kindest regards, > Martin Drews > > -- > ------------------------------------- > Martin Drews, Ph.D. > Danish Climate Center > Danish Meteorological Institute > Lyngbyvej 100, DK-2100 Copenhagen E > Email: [EMAIL PROTECTED] > Telephone (direct): +45 39157498 > ------------------------------------- > > > > > > _______________________________________________ > Bug-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/bug-gsl > _______________________________________________ Bug-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gsl
