Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Indexer inconsistent behaviour


I'm seeing some inconsistent behaviour in the C-editor while parsing C
code and displaying red markers/squiggly lines. Thought I'd post here
before submitting a bugzilla because I don't actually know what the
expected behaviour is, and also to see if the underlying problem was
already known and bug reported. 

This occurs with CDT 2.1 RC4.

Here's the case:

Create a new C project (doesn't seem to matter whether managed or std )
If I create a new Source file and add the following to it:

struct m
 int n;

int z (b) 
struct t b;
  return b.y;

I get red error markers and red squiggles under 
int z(b) 
struct t b;

If I hold the mouse over this code I get it says it's a syntax error. 

However, if I remove the struct m code (and sometimes I need to close
and reopen project to ensure it indexes it) then the int z code does not
have any errors marked on it. 

This is just a small test case, but I get similar sort of problems with
other bits of K&R style code. I'm not sure whether this kind of code is
normally marked out or just ignored ? Is this a bug & if it is, is there
already a bugzilla report for it ?

Tracy Miranda

Back to the top