"John Smith" <> wrote in message
news:MOKJf.39443$sa3.37126@pd7tw1no...
>I ran across this code from a statistics library. The header source code
>was not available.
>
> long double __declspec(naked) poisson_distribution(int k,long double m)
> {
> }
> long double pdtrl(int k,long double m )
> {
> long double v;
>
> if( (k < 0) || (m <= 0.0L) )
> {
> mtherr( "pdtrl", DOMAIN );
> return( 0.0L );
> }
> v = k+1;
> return( igamcl( v, m ) );
> }
>
> What would be the purpose of "__declspec(naked)" in the signature of
> poisson_distribution()? Is this legal C syntax? Why would the function
> body be empty?
>
__declspec(naked) is some sort of compiler-specific gibberish to make C
integrate with non-C code.
It is not legal, portable ANSI C, and won't compile on another compiler.
That's not the same as saying that it is bad code.
I would guess that the empty function body is a placeholder and the real
code is not written in C.
>
--
Buy my book 12 Common Atheist Arguments (refuted)
$1.25 download or $6.90 paper, available
www.lulu.com