This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 135422

Summary: C/C++ Syntax Error Highlighting: does not mark some errors
Product: cnd Reporter: crimcat <crimcat>
Component: Code ModelAssignee: Vladimir Kvashin <vkvashin>
Status: NEW ---    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description crimcat 2008-05-20 13:41:25 UTC
Let's have the following example:
-------------------------
static bool flag = false;

void
function_01(void)
{
    if(flag) {
        // some code
    } else {
        // some other code
    }
}

int
main(int argc, char** argv)
{
    return 0;
}
----------------------------
The add the following function _before_ "static bool flag" declaration:
void
function_02(void)
{
    if(flag) {
        // code
    }
}
The editor does not mark "flag" global variable usage as error, but it's actually declared _after_ the function_02() body.