结构alignas(x)在eclipse上

时间:2016-05-17 15:20:34

标签: c++ eclipse c++14

您好我在linux上运行eclipse mars版本

Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600

Linux:  Fedora21 3.18.5-201.fc21.x86_64
g++: (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)                                     

但是下面的代码在eclipse编辑器中显示为错误,带有黄色下划线和一个表示语法错误的问号,即使代码编译得很好。所有其他c ++ 14语法在稍微调整设置之后工作得很好,没有找到其他问题因为我打开了-std = c ++ 14标志等并且我的__cplusplus宏是正确的。 Eclipse识别其他项的alignas(x),但不识别struct关键字之后。有什么想法吗?

// Eclipse flags this as a syntax error with yellow underlines and a question mark
struct alignas(64) Test { 
int64_t x;
};

// this works fine
        alignas(64) const static double table[] =
        {
            1.0,           
            0.1,           
            0.01,          
            0.001,         
        } ; 

0 个答案:

没有答案