14.1.2.9 interrupt

To declare a C function as an interrupt handler, tag the function with the interrupt attribute.

For example: void __attribute__((interrupt)) _StackErrorTrap(void);

For attribute syntax, see 15.3.2 Syntax for Writing ISRs.

Note:

Interrupt functions must not be C++ functions; define them in a C module or use an extern "C" block.