Why does Eclipse CDT say: 'syntax error', but compilation no problem

前端 未结 10 1428
庸人自扰
庸人自扰 2021-02-04 08:04

I am working in existing C code which has a couple of lines with statements similar to this one:

struct collect_conn *tc = (struct collect_conn *) 
     ((char *         


        
10条回答
  •  执念已碎
    2021-02-04 08:37

    Iv got the same problem. There is 2 definition of offsetof (one for C and one for C++). IMO the problem come from that

    For example if i type

    #ifndef __cplusplus
    #endif
    

    Eclipse will grey it. It mean __cplusplus is defined, but my project is a C

    Unfortunatly i dont find a fix.

提交回复
热议问题