https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116056
Bug ID: 116056 Summary: [avr] Add support for __attribute__((signal(n))) Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- The current syntax of the "signal" and "interrupt" attributes imposes to have a function with an assembler name that resembles the ISR name, like in __attribute__((signal)) void __vector_1 (void) { // code } or __attribute__((signal)) void func (void) __asm("__vector_1"); void func (void) { // code } Moreover, the ISR function must be externally_visible. When the ISR should be implemented in a class or namespace, the following syntax might be easier to handle: __attribute__((signal (1))) [static] void func (void) { // code } where the ISR number is supplied by the attribute, and the generated code would be something like: func: .global __vector_1 __vector_1 = func