Question about "#pragma pack(n)" and "-fpack-struct"

2005-03-08 Thread feng qiu
Hello! Consider the following simple code. #pragma pack(2) struct TEST{ charx1; int x2; }; #pragma pack() main() { struct TEST t; printf("%d\n", sizeof(t)); } When I compile with "gcc" ,the output is 6.But the output is 5 when using "-fpack-struct"

Re: Question about "#pragma pack(n)" and "-fpack-struct"

2005-03-12 Thread feng qiu
acked, then you can't use -fpack-struct. -- Is it difficult to modify the gcc sources if I want to use the both? Thanks in advanced, Feng Qiu _ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com

Question about "#pragma pack(n)"

2005-04-04 Thread feng qiu
Hello! -fpack-struct and #pragma pack(2) are contraditctory instructions.And it seems to be never the intent to allow both.Is there a patch for this? If I want to modify the gcc source code,what should I do? Thanks in advanced, Diterlish __

Re: Question about "#pragma pack(n)"

2005-04-05 Thread feng qiu
ED,and TYPE_ALIGN in stor-layout.c file,but what is the difference in them?Should I modify this file? Thanks in advance, Feng Qiu From: James E Wilson <[EMAIL PROTECTED]> To: feng qiu <[EMAIL PROTECTED]> CC: gcc@gcc.gnu.org Subject: Re: Question about "#pragma pack(n)" Date: