9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] pls. HELP porting problem
@ 2005-04-29 10:53 Aharon Robbins
  2005-04-29 11:59 ` Bruce Ellis
  2005-04-29 12:31 ` Brantley Coile
  0 siblings, 2 replies; 15+ messages in thread
From: Aharon Robbins @ 2005-04-29 10:53 UTC (permalink / raw)
  To: 9fans

> in a similar way, one has been able to write
> 	p->f(args)
> rather than
> 	(*p->f)(args)
> for quite some time.

I think this actually worked in the V7 C compiler and PCC, no?

> perhaps it's not in the standard!

It is.  I think maybe even since 1989.

Arnold


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [9fans] pls. HELP porting problem
@ 2005-04-29  5:53 pac7
  2005-04-29  6:01 ` boyd, rounin
  2005-04-29  6:10 ` geoff
  0 siblings, 2 replies; 15+ messages in thread
From: pac7 @ 2005-04-29  5:53 UTC (permalink / raw)
  To: 9fans

/* 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



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-04-30  9:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-29 10:53 [9fans] pls. HELP porting problem 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-29 21:43     ` [9fans] killing none's process arisawa
2005-04-29 21:48       ` Russ Cox
2005-04-30  9:03     ` [9fans] pls. HELP porting problem Charles Forsyth
  -- strict thread matches above, loose matches on Subject: below --
2005-04-29  5:53 pac7
2005-04-29  6:01 ` boyd, rounin
2005-04-29  6:10 ` geoff
2005-04-29  8:20   ` Charles Forsyth

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).