7.2. GNU Fortran Compiler Directives

7.2 GNU Fortran Compiler Directives

The Fortran standard describes how a conforming program shall behave; however, the exact implementation is not standardized. In order to allow the user to choose specific implementation details, compiler directives can be used to set attributes of variables and procedures which are not part of the standard. Whether a given attribute is supported and its exact effects depend on both the operating system and on the processor; see C Extensions for details.

For procedures and procedure pointers, the following attributes can be used to change the calling convention:

  • CDECL – standard C calling convention
  • STDCALL – convention where the called procedure pops the stack
  • FASTCALL – part of the argument