cdecl, _cdecl, __cdecl (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index

Note: This feature is available only for the classic bcc32 compiler, not for the modern Clang-enhanced compiler.


Modifiers (C++), Keyword Extensions


cdecl data_or_function_definition;
_cdecl data_or_function_definition;
__cdecl data_or_function_definition;


Use a cdecl, _cdecl, or __cdecl modifier to declare a variable or a function using the C-style naming conventions (case-sensitive, with a leading underscore appended). When you use cdecl, _cdecl, or __cdecl in front of a function, it affects how the parameters are passed (parameters are pushed right to left, and the caller cleans up the stack). The __cdecl modifier overrides the compiler directives and IDE options.

The cdecl, _cdecl, and __cdecl keywords are specific to C++Builder.

Note: The __cdecl form is the only one supported by C++Builder 64-bit Windows (BCC64).