This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Possible bug in dbg-threads-syscall.c
- From: Robin Farine <acnrf at dial dot eunet dot ch>
- To: "Patrick Doyle" <wpd at delcomsys dot com>
- Cc: "eCos" <ecos-discuss at sourceware dot cygnus dot com>
- Date: 04 Dec 2001 20:27:26 +0100
- Subject: Re: [ECOS] Possible bug in dbg-threads-syscall.c
- References: <NFBBJAJICAKJPMMKDAGBGEACCNAA.wpd@delcomsys.com>
I guess C defines '*f' as a "function" :-P
Seriously, since C allows this:
typedef int int_fun(int);
then the type 'int_fun' represents the set of functions that take an int in
argument and that return an int. Then,
int_fun* int_fun_ptr;
naturally defines a pointer to such functions and
int_fun zozo;
represents a prototype declaration for the function 'zozo'. This differs from
"usual" declarations in that 'zozo' doesn't represent a variable, i.e.
zozo = ...;
would fail for anything at the right side.
HTMS,
Robin
"Patrick Doyle" <wpd@delcomsys.com> writes:
> In my CVS net source tree, 'dbg_syscall_ptr' is the double pointer to a
> function, 'f' is defined as 'dbg_syscall_func', which is a singler pointer
> to a function. I was just expressing curiosity as to what the heck the C
> language defines '*f' to be when 'f' is a declared as a (single) pointer to
> a function.
>
> --wpd
>
> >
> > > I am curious, however, if 'f' is a pointer to a function, what,
> > exactly does
> > > '*f' mean?
> >
> > For some reason I'm not entirely sure about, f is a double pointer to a
> > function. i.e. a pointer to a pointer to a function.
> >
> > Jifl