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

前端 未结 10 1386
庸人自扰
庸人自扰 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:46

    try switching the indexer to "Full c/C++ indexer (complete parse)" in Preferences->c/C++ -> indexer

    0 讨论(0)
  • 2021-02-04 08:46

    I fixed similar problem after checking the tab Error Parsers in Makefile Project in New CDT Project Wizard, removing CDT Visual C Error Parser (I am using gcc)

    0 讨论(0)
  • 2021-02-04 08:54

    I've seen Eclipse do this some times, and I use it for Java. Usually closing and opening the file again fixes it for me (resets whatever is wrong). It usually seems to be an error that WAS there but has been fixed and the "error cache" isn't updated correctly.

    0 讨论(0)
  • 2021-02-04 09:02

    I've fixed problem in eclipse CDT with Preferences->C/C++->Language Mappings : Add Content Type : C-header Language : C++

    0 讨论(0)
提交回复
热议问题