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 - Unresolved identifier in designated initializer of compound literal used in statement
Summary: Unresolved identifier in designated initializer of compound literal used in s...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-21 16:43 UTC by dpirch
Modified: 2016-09-01 14:27 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 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.