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.