04/03/10 10:59
>>615
typedef struct _hoge { int x; int y;} hoge;
hoge foo[16];
int *ptr1= &foo[0].x; //OK
int *ptr2= &foo[0].y; //NG
でも同じでした。
どうやら、構造体の最初のメンバーではOKで、それ以外のメンバーは計算が必要と判定されるようです。
でも、
hoge foo2; と配列でなく確保したら、
int *ptr3= &foo2.x;
int *ptr4= &foo2.y;
どっちもOKです。