View Single Post
Old 23-06-2010, 09:30 PM   #7
lybao_huy
Đệ tử 5 túi
 
Tham gia ngày: Jan 2008
Bài gửi: 97
:
À trong tài liệu MPLAB_C_Compiler_dsPIC có nói:
Note: The device architecture requires that words be aligned on even byte
boundaries, so care must be taken when using the packed attribute to
avoid run-time addressing errors.
vậy khai báo như sau sẽ vô nghĩa vì addressing error
struct foo
{
char a;
int x[2] __attribute__ ((packed));
};

vậy thì dùng packed Attribute chi cho mệt
lybao_huy vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn