How to stop Eclipse CDT from emitting errors due to gcc syntax?

I am writing code that uses computed goto. Syntax checking puts each goto *ptr and &&label instance as a syntax error. Anyway, to stop this?

Adding alkom:

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 turn yellow)

+8
c gcc eclipse eclipse-cdt gcc-extensions
source share
1 answer

In no case do not register an error in the CDT bugtracker , preferably with a patch for the parser.

+1
source share

All Articles