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看到这段代码全部变黄)
| 归档时间: |
|
| 查看次数: |
187 次 |
| 最近记录: |