请问在linux下编译程序怎么设置编译器字节对齐?

我在kdevelop下编程,遇到这个问题怎么设置?
---------------------------------------------------------------

#pragma pack(push,1) //设为byte对齐,1=byte,2=word,4=dword,8=qword
typedef struct DnStream{
char HuHao[21];
....
}DnStream;
#pragma pack(pop) //恢复对齐方式

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus