dotgnu-pnet
[Top][All Lists]
Advanced

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

Re: [Pnet-developers] [bug #4694] Possible BUG [PNET][PNET/C] cannot dec


From: Fergus Henderson
Subject: Re: [Pnet-developers] [bug #4694] Possible BUG [PNET][PNET/C] cannot declare a function returning a function
Date: Fri, 3 Oct 2003 12:51:11 +1000
User-agent: Mutt/1.3.28i

mdupont:
> Summary:  Possible BUG [PNET][PNET/C] cannot declare a function returning a 
> function
...
> int (*foo(float* ,int (*) (float*)))(float*);

Rhys Weatherley <address@hidden>:
> Serious abuse of C syntax - it's a miracle that it works
> in gcc.  It should be this:
> 
> int (*(*foo)(float* ,int (*) (float*)))(float*);

That has a different meaning.  The former declares `foo' as a function.
The latter declares `foo' as a pointer to a function.

        bash$ cdecl
        Type `help' or `?' for help
        cdecl> explain int (*foo(float* ,int (*) (float*)))(float*)
        declare foo as function (pointer to float, pointer to
                function (pointer to float) returning int) returning
                pointer to function (pointer to float) returning int

        cdecl> explain int (*(*foo)(float* ,int (*) (float*)))(float*)
        declare foo as pointer to function (pointer to float, pointer to
                function (pointer to float) returning int) returning
                pointer to function (pointer to float) returning int

-- 
Fergus Henderson <address@hidden>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


reply via email to

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