bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] Bug in gensymm.c


From: Patrick Alken
Subject: Re: [Bug-gsl] Bug in gensymm.c
Date: Wed, 9 Apr 2008 10:35:40 -0600
User-agent: Mutt/1.4.2.2i

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: address@hidden
> Telephone (direct): +45 39157498
> -------------------------------------
> 
> 
> 
> 
> 
> _______________________________________________
> Bug-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gsl
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]