NO

Author Topic: IDE: Functions disappear from the list when using a non-standard typecast  (Read 2604 times)

Hammurabi

  • Guest
If you use a non-standard typecast on a variable inside an expression evaluated with if or while, the functions placed after the one containing this expression (not alphabetically, but with the order given at the source file) disappear from the function list in the Source files panel.

To reproduce, copy this:

Code: [Select]
typedef int foobar_t;

void foo(void){

  DWORD X;

  while((foobar_t)X){

    foobar();

  }
}

void bar(void){

  foobar();

}

void foobar(void){

  return;

}

Then press Ctrl+S to save the file and unfold the function list from the Source files panel. "foo" should be the only function listed there.

Additionally, if you comment "foobar();" on line 9, thus leaving the while() loop with no code inside, only "foo" and "foobar" functions are listed after pressing Ctrl+S, with "bar" being still hidden.

If you replace "(foobar_t)X" on line 7 by "(int)X" or even "(DWORD)X" and press Ctrl+S again, then the three functions are correctly listed.
« Last Edit: March 27, 2010, 01:09:16 PM by Hammurabi »