Search code examples
c++stackcalling-convention

Any real use case for using the calling convention fastcall?


Have you had any real use case for using the calling convention fastcall?

Thanks.


Solution

  • Here's an article explaining when to use fastcall. It actually specifies a case when you actually have no alternative but to use it:

    Some VCL classes, such as TList, allow you to specify a callback function (a sort routine in the case of TList). You will have to use the __fastcall keyword in this case, too, as the VCL expects it.