我使用 C++ 进行项目,其中包含 ac 头文件 ira.h,如下所示:
#ifdef __cplusplus
extern "C" {
#endif
extern inline void disable_irqs() {
__asm__ __volatile__("\torc #0x80,ccr\n":::"cc");
}
extern inline void enable_irqs() {
__asm__ __volatile__("\tandc #0x7f,ccr\n":::"cc");
}
#ifdef __cplusplus
}
#endif
当我编译它时,我得到如下错误:
/usr/local/bin/h8300-hitachi-hms-g++ -DCXX -fno-rtti -fno-exceptions -O2 -fno-builtin -fomit-frame-pointer -Wall -I/brickos/include -I/brickos/include/lnp -I. -I/brickos/boot -c rcx1.C -o rcx1.o
In file included from PowerFunctionsController.H:32,
from rcx1.H:27,
from rcx1.C:21:
/brickos/include/lnp/sys/irq.h: In function `void disable_irqs(...)':
/brickos/include/lnp/sys/irq.h:99: parse error before `::'
/brickos/include/lnp/sys/irq.h: In function `void enable_irqs(...)':
/brickos/include/lnp/sys/irq.h:104: parse error before `::'
make: *** [rcx1.o] Error 1
我能做些什么?