| Author | 
                
                  Topic   | 
                  | 
              
              
                | 
                 sschmidt 
                New Member 
                  
                 
                
                USA 
                4 Posts  | 
                
                  
                    
                      
                       Posted - Oct 20 2011 :  12:20:33 PM
                        
                        
                      
  | 
                     
                    
                       Hi,
    if a free C function is used without a prototype declaration, VA underlines the name of the function in red and it is not available in 'Find References'. Basically,
  static void foo() { }
  void bla() {   foo();   -- underlined in red }
  However, this works fine:
  void foo();
  static void foo() { }
  void bla() {   foo();    -- fine }
  Is this intended?
  Kind regards, Sven | 
                     
                   
                 | 
              
              
                | 
                 feline 
                Whole Tomato Software 
                      
                 
                
                United Kingdom 
                19249 Posts  | 
                
                  
                    
                      
                       Posted - Oct 20 2011 :  2:16:42 PM
                        
                        
                      
  | 
                     
                    
                       Which IDE and version of VA are you using?
  I am not seeing any underlining problems using VS2008 and VA 1859, with the code placed into a .cpp file, and also into a .c file. | 
                     
                    
                        zen is the art of being at one with the two'ness | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 sschmidt 
                New Member 
                  
                 
                
                USA 
                4 Posts  | 
                
                  
                    
                      
                       Posted - Oct 20 2011 :  2:47:26 PM
                        
                        
                      
  | 
                     
                    
                       VA_X.dll file version 10.6.1859.0  built 2011.10.02 DevEnv.exe version 9.0.30729.1 Professional msenv.dll version 9.0.30729.1 Comctl32.dll version 6.10.7601.17514 Windows 7 6.1 Build 7601 Service Pack 1 8 processors (x86-64;  WOW64)
 
  Does this help?
  Regards, Sven
  PS: I will try to isolate the problem... | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 feline 
                Whole Tomato Software 
                      
                 
                
                United Kingdom 
                19249 Posts  | 
                
                  
                    
                      
                       Posted - Oct 20 2011 :  5:34:14 PM
                        
                        
                      
  | 
                     
                    
                       I am using the same IDE, version of VA and OS as you.  Using the following, renamed for clarity, test code, placed into a .cpp file:
 
 
 static void
freeFunctionNoDeclaration() {
}
void
callingFreeFunctionHere() {
	freeFunctionNoDeclaration(); // no underlining here
	bananaInvalidVar = 2;	// undefined variable
	bananaInvalidFunc();	// undefined function
}
  here is a screen shot showing what I am seeing:
 
  
  alt-g on the function call freeFunctionNoDeclaration() works correctly, taking me to the function implementation.
  Can you try this code in a new, blank file in your solution please.  You could be seeing the effects of something further up the current file confusing VA. | 
                     
                    
                        zen is the art of being at one with the two'ness | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 sschmidt 
                New Member 
                  
                 
                
                USA 
                4 Posts  | 
                
                  
                    
                      
                       Posted - Oct 21 2011 :  08:33:45 AM
                        
                        
                      
  | 
                     
                    
                       Hi,
    you are right. After creating a new file in the solution and pasting your snippet, it works fine. But, leaving VS and restarting, I see
 
 
 
  
  i.e. the two undef var/function do not appear underlined. Odd?
  OK, now I'm confused. After restarting VS, I navigated back to the original file that gave the trouble mentioned in the first post. All red underlines are gone. GotoImplementation now works, but FindReferences is still not working, although the function name is not underlined in red.
  Maybe I am using the wrong settings?
  Kind regards, Sven
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 feline 
                Whole Tomato Software 
                      
                 
                
                United Kingdom 
                19249 Posts  | 
                
                  
                    
                      
                       Posted - Oct 21 2011 :  12:01:54 PM
                        
                        
                      
  | 
                     
                    
                       VA does not underline mistyped symbols when you first open a file.  VA only starts underlining after you have edited the file.  Adding and deleting a space is enough to trigger the underlining.  This is an optimisation to speed up code browsing.
  So this will explain why underlining seems to disappear and reappear when you restart the IDE.
  When Find References is not working, what happens when you try to trigger Find References?  Is Find References offered at all?  If it is offered, does it run?  If so, how many references does it find? | 
                     
                    
                        zen is the art of being at one with the two'ness | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 sschmidt 
                New Member 
                  
                 
                
                USA 
                4 Posts  | 
                
                  
                    
                      
                       Posted - Oct 21 2011 :  12:30:28 PM
                        
                        
                      
  | 
                     
                    
                       OK, thanks for clarification.
  Find References shows a dialog saying "Find References is not available because the symbol is unrecognized". Also doesn't work with local variables as I have just seen in one file. For a different file in the same solution, it works and shows all occurrences of the local variable in that function.
  Regards, Sven
  PS: I wish I could be more specific. I find it hard to exactly reproduce these issues as certain actions like     restarting the IDE make VS work again in some cases. However, at other times, I see issues with VA and don't     know what led to them. | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 feline 
                Whole Tomato Software 
                      
                 
                
                United Kingdom 
                19249 Posts  | 
                
                  
                    
                      
                       Posted - Oct 21 2011 :  1:36:48 PM
                        
                        
                      
  | 
                     
                    
                       Find References not working on a local variable is a good case to study, since it is quite clear cut.  This sounds like a parsing problem, something has confused our parser.  Probably something further up the file.
  Try turning on:
  VA Options -> Advanced -> Fonts and Colors -> Local symbols in Bold
  this should give you some information, since if local symbols in some functions are no longer going bold, this helps to narrow down where the problem starts.
  Also try looking at the Alt-m list and VA Outline for the problem file:
  http://www.wholetomato.com/products/features/methods.asp
  http://www.wholetomato.com/products/features/vaoutline.asp
  If these start to give the wrong results after the 3rd function in the file, then this suggests this is where the problem code lies.  One thing that I have seen confuse VA is unmatched brackets like this:
 
 static void testUnmatchedBrackets
{
#if 0
    {
        {
#endif
}
 but in your problem file the problem may be different.  If you have a file where you can reliably reproduce the problem, and if you are able to send me the file for testing purposes, then I can have a look at it and try to find out what is causing the problems.  I realise this is often not possible, but it is worth mentioning in case you can send me the file.
  Please submit the files via the form:
  http://www.wholetomato.com/support/contact.asp
  including this thread ID or URL in the description, so we can match it up. | 
                     
                    
                        zen is the art of being at one with the two'ness | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                |   | 
                
                  Topic   | 
                  |