Author Topic: can't find declaration of some variables  (Read 4163 times)

Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
can't find declaration of some variables
« 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;
the context-menu command "Find declaration of '[any of these variables] " fails, i.e.:
Code
Warning
Not found: myFirstVar

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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: can't find declaration of some variables
« Reply #1 on: April 18, 2008, 08:34:59 pm »
If variables are defined as
Code
const int myFirstVar = 1 << 4;
const int mySecondVar = 1 << 2;
const int myNum = myFirstVar | mySecondVar;
the context-menu command "Find declaration of '[any of these variables] " fails, i.e.:
Code
Warning
Not found: myFirstVar

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

Thanks for the simple test case.
Fixed in svn, rev5007.
Be patient!
This bug will be fixed soon...

hKarel

  • Guest
Re: can't find declaration of some variables
« Reply #2 on: December 02, 2008, 11:07:15 pm »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: can't find declaration of some variables
« Reply #3 on: December 02, 2008, 11:57:55 pm »
Hello, all
I use svn, rev5322. The error is not corrected.
Should (now really) be fixed in svn (r5327).

In the same way, the error reveals itself when variable is a parameter of function.

Can you give a short example ?

hKarel

  • Guest
Re: can't find declaration of some variables
« Reply #4 on: December 03, 2008, 09:07:05 am »
Simple example:
Code
int main(int argc, char *argv[])
{
  ........ 
  int my_argc = argc;
 
}
Find declaration of 'argc' - Not found