Crossware

Table of Contents        Previous topic       Next topic       

C/C++ COMPILER->Function Calling Conventions->Introduction

The way that a function is called and returns is its calling convention.  The Crossware ColdFire C compiler supports four calling conventions:


TraditionalThis is the calling convention used unless the Advanced Features of the compiler are enabled.
__cdeclThis is the default calling convention used when the Advanced Features of the compiler are enabled.
__fastcallThis is the calling convention used when the Advanced Features of the compiler are enabled and /Gr option is used.
__stdcallThis is the calling convention used when the Advanced Features of the compiler are enabled and /Gz option is used.

Individual functions can also be declared using the __cdecl, __fastcall and __stdcall qualifiers to override the command line option.  These qualifiers are ignored unless the Advanced Features of the compiler are enabled.

The four calling conventions are described below.