bmoeller said:

> Why that?  These two calls mean exactly the same, in particular there
> is no difference as far as the prototype (or lack thereof) is
> concerned.

You are correct! Appendix A7.3.2 of the ANSI version of K and R, which I had
missed, clearly states:

In the first edition, the type was restricted to "function," and an explicit
* operator was required to call through pointers to functions. The ANSI
standard blesses the practice of some existing compilers by permitting the
same syntax for calls to functions and to functions specified by pointers.
The older syntax is still usable.

Frank

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 17, 2000 6:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Plz help ! Can't build OpenSSL 0.9.6 with BCB4.
> 
> 
> Frank Balluffi <[EMAIL PROTECTED]>:
> > Someone said:
> 
> >> The real fix would be to eliminate all
> >> remaining non-ANSI constructs (that have still be left in 
> because of
> > > their implicit type conversion).
> 
> > What about calling a callback function? According to the 
> original and ANSI
> > versions of K and R, a pointer to a function should be 
> de-referenced. For
> > example:
> > 
> >     ret=(*cb)(...);
> > 
> > not
> > 
> >     ret=cb(...);
> 
> Why that?  These two calls mean exactly the same, in particular there
> is no difference as far as the prototype (or lack thereof) is
> concerned.  In fact, *all* function calls use a function pointer --
> if you explicitly name a function or dereference a function pointer,
> there's an implicit conversion into the appropriate pointer.
> 
> If you want to make really really really clear that 'cb' is a pointer,
> you can even write
> 
>      ret = (*(*(*(*(*(*(*(*cb)))(...))))));
> 
> because each '*' is effectively ignored :-)
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to