INF:Why Functions Are Prototyped _cdecl in System Include File

ID Number: Q37233

5.00 5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a

MS-DOS | OS/2

Summary:

Functions are declared with C calling and naming conventions with the

attribute cdecl in C 5.1, with _cdecl in C 6.0, 6.0a, and 6.0ax, and

with __cdecl in C/C++ 7.0.

C calling and naming conventions are used by default except when the

/Gc switch is specified during compilation. The /Gc switch tells the

compiler to default to FORTRAN/Pascal calling and naming conventions.

Thus, the _cdecls on the function prototypes tell the compiler to

generate the run-time library function calls using C calling and

naming conventions always, even if the /Gc option is used.

Additional reference words: 5.10 6.00 6.00a 6.00ax 7.00