Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] (file-) static variables

Hi Andrew,

* Question:
  I need to distinguish between a file-static and a global variable,
  as the scope of refactoring will be totally differnet:
  // ----------------------------------------------------------------
     static int xx;  // refactoring is limited to a single file
     int global;     // refactoring needs to consider a lot of files.
  // ----------------------------------------------------------------

  How can I distinguish the two cases assuming I have got a binding
  of type IVariable?

* Shortcoming:
  Given the code
  // ----------------------------------------------------------
     extern int globalVar; 	// in file.h, included by file.cpp
     int globalVar;           // in file.cpp 
     
     int foo() {
        globalVar= 1;
     }
  // ----------------------------------------------------------    
  
  when resolving the binding for the reference to globalVar, I get an
  DOMException, cause the binding is ambigous. Which is sort of true,
  but still I need to look at one of the bindings.

  Do you want me to create bugzillas for things like that?

Markus.









Back to the top