Previous: Options information, Up: Defines


4.3 “Keyword” macros

Most AmigaOS-specific ‘C’ compilers have special “custom keywords”, which make the AmigaOS-specific development easier. Unfortunately, the idea of “custom keywords” is not available in ‘GCC’. However, ‘attributes’ are available, and they provide virtually identical functionality. For compatibility with other AmigaOS ‘C’ compilers, preprocessor symbols are provided, which expand to the appropriate ‘attributes’ (see Attributes).

__chip
See chip.
__saveds
See saveds.
__interrupt
See interrupt.
__stackext
See stackext.
__regargs
See regparm.
__stdargs
See stkparm.
__aligned
This expands to the standard ‘GCC’ ‘__attribute__((aligned(4)))’.
Note: With ‘SAS/C’, these keywords may be specified either before or after the type, so the following declaration is correct:
     __saveds void func(void);

Unfortunately, the syntax rules of ‘GCC’ 2.7.2.1 do not allow to specify the attributes before the type, so the above example must be changed to:

     void __saveds func(void);

This will be fixed in ‘GCC’ 2.8.0.