[fpc-devel] Re: cdecl and constant parameters

Seth Grover sethdgrover at gmail.com
Thu Apr 1 14:43:02 CEST 2010


Jonas said:
> I personally think that the documentation should not say anything at all about how "const"
> parameters are passed, as this should be an implementation detail that nobody should care about.
>
> That said, with "cdecl", "const" has the same meaning as it has in C, which is "pass the
> argument exactly the same way as when there is no const modifier".

In principle I do agree with you that most developers don't care about
the underlying implementation of how parameters are passed. In my
specific case, performance is extremely critical in the project we're
working on, and knowing things like this are important to squeezing
every last bit of performance out of our code (it's faster to pass a
pointer to the record than put the whole thing on the stack).

Anyway, thanks for your insight. Sorry to bring up a discussion you've
already had a few times (as Michael said), I guess I need to Google
better next time. :)

Thanks again!

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover
sethdgrover[at]gmail[dot]com



More information about the fpc-devel mailing list