Eclipse indexing wronglyhttps://www.eclipse.org/forums/index.php/mv/msg/461692/1022322/#msg_1022322
I posted this under different category eariler.

I've found a problem and I think it might be an eclipse bug.

I am on redhat 5 x64 running juno. The following code prints out checkpoint2. However, eclipse grayed out checkpoint1 and checkpoint2 . Appraently, eclipse uses a different ULONG_MAX value as from the gcc compiler. Is this a bug from eclipse?

]]>Axel Mueller2013-03-22T12:16:28-00:00Re: Eclipse indexing wronglyhttps://www.eclipse.org/forums/index.php/mv/msg/461692/1022837/#msg_1022837
you probably know that Eclipse and CDT are written in Java?
The biggest integer Data Type in Java is long, which is a 64 Bit SIGNED type. This is the reason, why the Editor grayed out the 'if' wrongly, because CDT internally is using "long".

Try out this example, it's using the biggest number, which CDT (and Java) could save in a primitive Data Type "long". In this example checkpoint2 is not grayed out:

regards,
Klaus
]]>Klaus km2013-03-22T16:05:08-00:00Re: Eclipse indexing wronglyhttps://www.eclipse.org/forums/index.php/mv/msg/461692/1022869/#msg_1022869
Thanks. I don't see an existing bug so I created one last week, ID 403404.

I used your example and yes the checkpoint2 is NOT grayed out.

My case is not as simple as printing out "checkpoinsts". I actually have some typedef within each if condition. Wrongly grayed out means the typedef declaration within the if statement will NOT be known and so the indexing throughout the whole program fails.

If you have a central header you could add your own define (for 32Bit/64Bit) and then use this new define in your code - but you must change your source...

regards,
Klaus
]]>Klaus km2013-03-22T17:59:29-00:00Re: Eclipse indexing wronglyhttps://www.eclipse.org/forums/index.php/mv/msg/461692/1022893/#msg_1022893
changing the source code for this purpose. Hopefully, I can get some outlook from the Eclipse developer(s) to see when this will be fixed.]]>David W2013-03-22T18:35:10-00:00