I'm finding that when I attempt to use find declaration on a particular variable (a pointer to an array of characters), it defeats CodeBlocks which claims the variable is not found. It's able to find other variables just fine, but the one in question is defined as:
char (*varname)[7];
And is assigned memory with:
varname = malloc(7 * sizeof(char) * tracks);
Where "tracks" is an unsigned long int that is otherwise irrelevant to this issue. Unless I'm mistaken, this is the correct syntax to use for defining this type of variable, as "char *varname[7]" is supposed to instead refer to an array of pointers.
I forgot to mention this happens in the latest nightly build (April 12, 2015), as well as several older nightlies that I tried.
Additionally, since this is probably a good time to mention it, I often find that I have to use "find declaration" multiple times to jump to its declaration. It will say the variable is not found and then when I've tried enough times it will then find it and will display the declaration. This happens for very simplistic variables and macro definitions, the only thing that makes them at all complicated is that they generally are declared in a header file other than the source file I have open.
Last edit: raynebc 2015-04-15
Can you post minimal self-contained project and exact steps to reproduce the problem?
I'm attaching a simple source file that easily reproduces the bug I mentioned in the first post. Just open it, right click on the buffer variable name in line 8 and select "Find declaration of: 'buffer'". When I do that, I immediately get a "Not found: buffer" dialog notice.
About the other bug I mentioned with "Find declaration", I tried to create a simple project of two source files and one header file but couldn't reliably reproduce this behavior. It may only be prone to happening on larger projects. If anybody wanted to investigate, the project that I work on that triggered the problem is here:
http://code.google.com/p/editor-on-fire/
Diff:
I can confirm this bug. I also change the title
I think this bug report is duplicated with this Code::Blocks / Tickets / #127 Code completion fails with complex declarations/definitions