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 - Unresolved usage of function name as pointer for static member initialization
Summary: Unresolved usage of function name as pointer for static member initialization
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-29 16:57 UTC by nnnnnk
Modified: 2009-03-29 20:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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