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 197394 - Resolving member in array of struct fails
Summary: Resolving member in array of struct fails
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P3 normal with 1 vote (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 13:45 UTC by fse
Modified: 2011-05-12 13:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of the compiler's version dialog (54.67 KB, image/png)
2011-05-09 07:28 UTC, fse
Details
Screenshot of the problem in Netbeans' edtitor window (25.17 KB, image/png)
2011-05-09 07:30 UTC, fse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fse 2011-04-04 13:45:47 UTC
Hi

The following example is compilable, but the editor complains "Unable to resolve identifier mi". I am using the MinGW TDM toolchain.
Thanks for your work!

//------------------------------------
#include <windows.h>
#include <winuser.h>

int main(int argc, char** argv)
{
	INPUT inputList[1];
	inputList[0].mi.dx = 1;
	return 0;
}
//------------------------------------
Comment 1 nnnnnk 2011-05-06 10:23:01 UTC
hello,

please, could you provide declaration of INPUT structure.

with declaration from http://msdn.microsoft.com/en-us/library/ms646270%28v=vs.85%29.aspx I can not reproduce the issue.
Comment 2 fse 2011-05-09 07:28:53 UTC
Created attachment 108184 [details]
Screenshot of the compiler's version dialog
Comment 3 fse 2011-05-09 07:30:24 UTC
Created attachment 108185 [details]
Screenshot of the problem in Netbeans' edtitor window
Comment 4 fse 2011-05-09 07:38:06 UTC
Hi

The INPUT structure is declared on my system in this way:

  typedef struct tagINPUT {
    DWORD type;
    __MINGW_EXTENSION union {
      MOUSEINPUT mi;
      KEYBDINPUT ki;
      HARDWAREINPUT hi;
    } DUMMYUNIONNAME;
  } INPUT,*PINPUT,*LPINPUT;

I added screenshots of my MinGW TDM version info window and of my Netbeans editor window showing the error as it is displayed on my 64 bit systems (I did not check on 32 bit). Hope this helps.

Regards

Friedemann Seebass
Comment 5 soldatov 2011-05-11 14:34:36 UTC
minimal test case:

typedef struct tagINPUT {
  DWORD type;
  __extension__ union {
		MOUSEINPUT mi;
		KEYBDINPUT ki;
		HARDWAREINPUT hi;
  } ;
} INPUT,*PINPUT,*LPINPUT;

int main(int argc, char** argv)
{
    INPUT inputList[1];
    inputList[0].mi.dx = 1;
    return 0;
}