Author Topic: A BUG for parse C language code  (Read 1713 times)


  • New Community Member
  • Posts: 1
  • Hero Points: 0
A BUG for parse C language code
« on: August 17, 2010, 07:32:33 pm »
A C language code like this:

Code: [Select]
#define JQKA


struct S1 {};
struct S2 {};

S1 and S2 should appear in the symbol list, but it is not the case, only the S2, not S1.

SE v15.0.1
« Last Edit: August 17, 2010, 07:34:22 pm by monkeycz »


  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: A BUG for parse C language code
« Reply #1 on: August 18, 2010, 12:36:24 am »
For performance reasons, SE does not do full evaluation of preprocessor directives while tagging.
So SE is seeing JQKA as literally JQKA, which naturally is a syntax error, and SE's tagging parser recovers after the semicolon.

You need to give SE a hint about the preprocessor directive:
In the Tools|Options dialog, in the C/C++ Preprocessing node, tell SE that "JQKA" is defined as nothing.