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 256329 - Fields of anonymous struct member of union are not recognized by editor parsing...
Summary: Fields of anonymous struct member of union are not recognized by editor parsi...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.0.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-02 22:49 UTC by mrellis63
Modified: 2015-11-05 12:55 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 mrellis63 2015-11-02 22:49:30 UTC
struct _Validation {
    unsigned char signature1;
    unsigned char signature2;
};

typedef union {
    unsigned char data [2];
    struct _Validation;          //<---- This is marked with unresolved ident.
} EEPROM_DATA;

void main(void) {

   EEPROM_DATA edata;
     
    edata.data [0] = 0xAA;      // This is ok
    edata.signature2 = 0xDD;    // <---- This is marked with unresolved ident.
}
Comment 1 petrk 2015-11-03 12:22:09 UTC
It is worth to mention that it is MS extension. GCC can compile this code with "-fms-extensions" flag.
Comment 2 mrellis63 2015-11-03 19:31:50 UTC
Yes GCC compiler will compile without warning using -fms-extensions. But CND parsing for editor still marks the expression with error. Is that not separate and independent of compiler options?
Comment 3 petrk 2015-11-05 12:55:23 UTC
You are right "-fms-extensions" option doesn't affect on IDE parser. I just meant that this construction (anonymous nested structure _Validation) is an extension. Therefore this bug is not the highest priority for us right now.