Skip to content

Feature request: Make __interrupt n be able to define macro like __interrupt(x) #5

@wxwok

Description

@wxwok

for

void isr(void) __interrupt 7 {
}

Some IDEs, like JetBrains Clion and Vscode, have code analyzers that are compatible with GCC. For editing code in these IDEs, we can define macros to avoid unresolved symbols, such as:

 #ifndef SDCC
	#define __sfr volatile unsigned char
	#define __sbit volatile unsigned char
	#define __at(x)
	#define __xdata
 #endif

But the __interrrupt n can't be defined as a macro, and IDEs will report an undefined symbol except to modify the source code to define a new macro like:

#ifdef SDCC
    #define INTERRUPT_HANDLER(x)  __interrupt 7
#else
    #define INTERRUPT_HANDLER(x)
#endif

void isr(void) INTERRUPT_HANDLER(7)
{
}

Can the __interrupt n be defined to __interrupt(n)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions