注册变量存储类错误

时间:2014-11-27 11:42:32

标签: c compiler-errors macros c-preprocessor

请帮我解决这个错误:

  

错误:为' interrupt_save_disabled'指定的存储类        #define TX_INTERRUPT_SAVE_AREA注册unsigned int interrupt_save_disabled;

这是一个使用它的头文件:

#if defined (WIN32) || defined (LINUX)
#define register
#endif
  TX_INTERRUPT_SAVE_AREA

2 个答案:

答案 0 :(得分:2)

您无法在全局变量上拥有register。删除说明符。

答案 1 :(得分:1)

只需删除register即可。这毫无意义。