Brian 

Thanks I have tried your suggestion and it works fine.

Rene Girard

Brian Gough <[EMAIL PROTECTED]> wrote: Rene Girard wrote:
> gcc  -O2 -Wall -ansi -I/usr/local/include -c -o t_dn2.o t_dn2.c
> t_dn2.c: In function ‘g_x’:
> t_dn2.c:61: warning: dereferencing ‘void *’ pointer
> t_dn2.c:61: error: void value not ignored as it ought to be
 >
> double g_x(double x, void *params)
>  {
>   const double pi = 4.0*atan(1.0);    
>   double yo,y1;
> 
>   yo = (sin(pi*x/2.0)*sin(pi*params[1]/2));
>   y1 = yo*yo;

With the prototype for g_x() above params[1] is an invalid expression, 
because params has void* type.  Use something like  double *p = params; 
then access elements as p[0], p[1] etc.

-- 
best regards,

Brian Gough

Network Theory Ltd,
Publishing "An Introduction to GCC"
http://www.network-theory.co.uk/gcc/


                
---------------------------------
All new Yahoo! Mail  
---------------------------------
Get news delivered. Enjoy RSS feeds right on your Mail page.
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to