On Thu, Nov 09, 2006, Dr. Stephen Henson wrote:

> On Thu, Nov 09, 2006, Richard Salz wrote:
> 
> > > davids> simple -- if you are going to call a function whose types you
> > > davids> don't know (through a prototype), you must cast each type you
> > > davids> pass to the type the function expects. End of story. OpenSSL
> > > davids> does not do this. This is not valid C whether or not the type
> > > davids> sizes are the same.
> > 
> > I don't think that's correct.  If you are calling a function where a 
> > prototype is not in scope, the 'classic' promotion rules are used (float 
> > to double, char or short to int, etc).
> > 
> 
> Well just to add to the confusion... I've compiled up gcc4.2 myself from
> source just to see what is going on.
> 
> Yes it does indeed give the reported issues but what is strange is that almost
> identical constructs (the safestack, and some related macros) don't even
> generate a warning.
> 

Which was mainly due to me not having the right versions of the safestack
macros enabled but hey, its been a long week :-)

Hmmm nasty. It will tolerate function pointer casting if a variable is used
but I suspect that's more because the optimizer hasn't yet learned to stamp
on it.

OK, looks like inline calls is the way to go. Those at least have some
advantages over the existing stuff.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to