User forums > Using Code::Blocks

can't find declaration of some variables

(1/1)

r.stiltskin:
If variables are defined as

--- Code: ---const int myFirstVar = 1 << 4;
const int mySecondVar = 1 << 2;
const int myNum = myFirstVar | mySecondVar;

--- End code ---
the context-menu command "Find declaration of '[any of these variables] " fails, i.e.:
--- Code: ---Warning
Not found: myFirstVar
--- End code ---

Is this a bug, or is there something I can do to locate such declarations in my project?

mandrav:

--- Quote from: r.stiltskin on April 18, 2008, 08:02:39 pm ---If variables are defined as

--- Code: ---const int myFirstVar = 1 << 4;
const int mySecondVar = 1 << 2;
const int myNum = myFirstVar | mySecondVar;

--- End code ---
the context-menu command "Find declaration of '[any of these variables] " fails, i.e.:
--- Code: ---Warning
Not found: myFirstVar
--- End code ---

Is this a bug, or is there something I can do to locate such declarations in my project?

--- End quote ---

Thanks for the simple test case.
Fixed in svn, rev5007.

hKarel:
Hello, all
I use svn, rev5322. The error is not corrected.
In the same way, the error reveals itself when variable is a parameter of function.

Jenna:

--- Quote from: hKarel on December 02, 2008, 11:07:15 pm ---Hello, all
I use svn, rev5322. The error is not corrected.

--- End quote ---
Should (now really) be fixed in svn (r5327).


--- Quote from: hKarel on December 02, 2008, 11:07:15 pm ---In the same way, the error reveals itself when variable is a parameter of function.

--- End quote ---

Can you give a short example ?

hKarel:
Simple example:

--- Code: ---int main(int argc, char *argv[])
{
  ........ 
  int my_argc = argc;
 
}

--- End code ---
Find declaration of 'argc' - Not found

Navigation

[0] Message Index

Go to full version