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 151751

Summary: Unresolved usage of function name as pointer for static member initialization
Product: cnd Reporter: nnnnnk <nnnnnk>
Component: Code ModelAssignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description nnnnnk 2008-10-29 16:57:54 UTC
Example:
struct S {
    void (*f)();
};

static void foo(){
}

class C {
public:    
    static S s;
};

S C::s =
{
    foo // unresolved
};

int main() {
    C::s.f();
    return 0;
}
Comment 1 nnnnnk 2008-10-29 18:37:47 UTC
It seems that it's a common bug for static members initialization.
Example 2:
static void foo(){
}

typedef void (*pf) ();

class C {
public:
    static pf f;
};

pf C::f = foo;

int main() {
    C::f();
    return 0;
}
Comment 2 Vladimir Voskresensky 2009-03-29 02:41:25 UTC
fixed + test:
http://hg.netbeans.org/cnd-main/rev/5da4a5ef8d62
Comment 3 Quality Engineering 2009-03-29 20:16:53 UTC
Integrated into 'main-golden', will be available in build *200903291400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5da4a5ef8d62
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed IZ#151751: Unresolved usage of function name as pointer for static member initialization