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 267663

Summary: Unresolved identifier in designated initializer of compound literal used in statement
Product: cnd Reporter: dpirch <dpirch>
Component: Code ModelAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description dpirch 2016-08-21 16:43:54 UTC
This issue is similar to bug #257822, which was about unresolved identifiers in compound literals appearing in *declarations*, and is apparently fixed now.

However, designated initializers are still unresolved if compound literals are part of statements instead of declarations:


struct Foo
{
    int foo;
};

int main()
{
    struct Foo *bar1 = &(struct Foo){
        .foo = 3    // foo is resolved
    };

    int bar2 = (&(struct Foo){
        .foo = 13   // foo is resolved
    }, 42);


    bar1 = &(struct Foo){
        .foo = 23    // foo is NOT resolved
    };
}


Tested in nightly build 201608210002.