I'm writing some code that makes use of computed goto. The syntax checker is flagging every instance of goto *ptr
and &&label
as syntax error. Is there anyway to stop this?
Addition by alk:
Example for computed gotos (gcc extension):
...
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:
...
(eclipse
seeing this code gets yellow all over)
No way other then filing a bug to the CDT bugtracker, preferably with a patch for the parser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With