如何阻止Eclipse CDT因gcc特定语法而发出错误?

cle*_*ong 8 c eclipse gcc eclipse-cdt gcc-extensions

我正在编写一些使用计算goto的代码.语法检查器正在标记每个实例goto *ptr&&label语法错误.反正有没有阻止这个?

添加量:

计算得到的例子(gcc扩展名):

...

void * pLbl = NULL;

if (<some expression>)
  pLbl = &&lbl1;  /* gcc extension: no, '&&' is not a typo */
else if (<some other expression>)
  pLbl = &&lbl2;  /* gcc extension: no, '&&' is not a typo */

if (pLbl)
  goto * pLbl;  /* gcc extension: goes/jumps to either 'lbl1' or 'lbl2' */

goto lbl0;

lbl1:
  <do some stuff>
goto lbl0;

lbl2:
  <do some other stuff>
goto lbl0;

lbl0:

...
Run Code Online (Sandbox Code Playgroud)

(eclipse看到这段代码全部变黄)

Eug*_*ene 1

除了向CDT bugtracker提交错误之外别无他法,最好是为解析器提供补丁。