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 215950 - Parser fails to parse anonymous struct initialization in for loop (Valid c99)
Summary: Parser fails to parse anonymous struct initialization in for loop (Valid c99)
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-25 14:16 UTC by coops
Modified: 2014-11-19 13:49 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 coops 2012-07-25 14:16:00 UTC
#include <stdlib.h>
#include <stdio.h>


int main(int argc, char *argv[]) {
    for (struct {int foo;} i = {0}; i.foo < 5; i.foo++)
        printf("%d\n", i.foo);
    exit(0);
}

/* This code is completely valid c99 and will run and execute without problem with -std=c99. However the Netbeans parser breaks and reports "Unable to resolve identifier foo" making Netbeans programming in source code containing this pattern impossible. */