Eclipse CDT syntax error on __attribute__ keyword
问题 I would like to know if there is a way to get rid of CDT syntax error warnings when using gcc's " __attribute__ " keyword. It goes without saying that I would not like to switch off CDT syntax check. 回答1: The "ECLIPSE_THINKS_THIS_IS_SET_BUT_GCC_DOESNT" definition (from ams 's answer) really extsts and it called __CDT_PARSER__ . For example: #ifdef __CDT_PARSER__ #define __FILE__ "<file>" #define __LINE__ (-1) #define __DATE__ "<date>" #define __TIME__ "<time>" #endif // #ifdef __CDT_PARSER__