__attribute__ ?

Status
Not open for further replies.

asrock70

Full Member level 4
Joined
Oct 9, 2010
Messages
201
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
3,252
Can someone explain the code in C ++ for gcc

Code:
extern "C" void ADC1_COMP_IRQHandler (void) __attribute__((alias("_ZN6AdcIrq3IrqEv")));

Meaning I understand, instead of the default interrupt handler ADC1_COMP_IRQHandler calls its own function void AdcIrq::Irq (void) .
What I probably don't understand the most is "_ZN6AdcIrq3IrqEv"

Second question.
How is the same thing written in C MDKARM or c IAR (not support __attribute__ ) ?

Thanks for explaining.
 

Refer to gcc manual

The cryptic function name will be probably found in a target specific library. If no alias construct is supported by your tool chain, you can surely reference the function directly.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…