Function Attributes (Redux)

For various reasons, I don’t support orca’s pragmas or toolbox extensions, instead handling them via function attributes. After converting some ORCA/C toolbox headers, I decided to add support for ORCA/C’s pascal and inline keywords.

So, a toolbox call can now be declared as

extern pascal Word MMStartUp(void) inline(0x0202, dispatcher);

or

extern Word [[pascal, inline(0x0202, dispatcher)]] MMStartUp(void);

As a side note, I suspect the inline statement came to ORCA/C by way of APW C by way of MPW C and MPW Pascal, which had an inline statement with a list of hex words (usually 680x0 trap instructions for the tool call). MPW Pascal IIgs also supported inline code but generally used library glue for tool calls.

The function attributes are now included with the return type rather than after the function definition. This better matches GCC and c++11 function attributes. Additionally, the c99 inline and c11 _Noreturn specifiers are now parsed (but so far do nothing).