9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: pac7@post.cz
To: 9fans@cse.psu.edu
Subject: [9fans] pls. HELP porting problem
Date: Fri, 29 Apr 2005 07:53:37 +0200	[thread overview]
Message-ID: <cc018ff1fabf2da3403adbdf6b786d8e@www2.mail.post.cz> (raw)

/* code from a native port: */
/* Definition of an arbitrary function with parameters */
struct gsl_function_struct 
{
  double (* function) (double x, void * params);
  void * params;
};
typedef struct gsl_function_struct gsl_function ;
#define GSL_FN_EVAL(F,x) (*((F)->function))(x,(F)->params)


/* Declarations */
gsl_function weighted_function;
static double fn_cauchy (double x, void *params);


/* main (foo.c)*/
#include <u.h>
#include <libc.h>
/* line 55 :*/
      weighted_function.function = &fn_cauchy;
      weighted_function.params = &fn_params;
=====>
mk: warning: foo.c:55 qawo.c:39 address of array/func ignored

Q1: Why?
Q2: Reccommended workaround??

tx,
++pac.




-- 
Levnější internet v pracovní dny již od 18:00 hod.
Surfujte s VOLNÝ!
http://mimospicku.volny.cz



             reply	other threads:[~2005-04-29  5:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29  5:53 pac7 [this message]
2005-04-29  6:01 ` boyd, rounin
2005-04-29  6:10 ` geoff
2005-04-29  8:20   ` Charles Forsyth
2005-04-29 10:53 Aharon Robbins
2005-04-29 11:59 ` Bruce Ellis
2005-04-29 15:15   ` rog
     [not found]   ` <6ea05dc57c13d1df7359ec63990a0f8b@vitanuova.com>
2005-04-29 15:25     ` Bruce Ellis
2005-04-29 15:38       ` C H Forsyth
2005-04-29 16:09         ` Bruce Ellis
2005-04-29 12:31 ` Brantley Coile
2005-04-29 18:06   ` Ah Q
2005-04-30  9:03     ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc018ff1fabf2da3403adbdf6b786d8e@www2.mail.post.cz \
    --to=pac7@post.cz \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).