X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org X-Trace: 124685539/mk-filter-1.mail.uk.tiscali.com/B2C/$b2c-THROTTLED-DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/79.66.17.75/None/johne53 AT tiscali DOT co DOT uk X-SBRS: None X-RemoteIP: 79.66.17.75 X-IP-MAIL-FROM: johne53 AT tiscali DOT co DOT uk X-MUA: Microsoft Outlook Express 6.00.2900.2180Produced By Microsoft MimeOLE V6.00.2900.2180 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEALCYWElPQhFL/2dsb2JhbACEVbo6WI8chkQ Message-ID: <003901c969db$cd57fde0$4001a8c0@mycomputer> From: "John Emmas" To: References: <006b01c965c1$6a7c6300$4001a8c0 AT mycomputer> <003a01c965fe$539063c0$4001a8c0 AT mycomputer> <495291CD DOT 1000207 AT bmts DOT com> <004701c96993$ea2fa5f0$4001a8c0 AT mycomputer> Subject: Re: Cygwin struct alignment Date: Mon, 29 Dec 2008 17:35:11 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Note-from-DJ: This may be spam ----- Original Message ----- From: "Brian Ford" Subject: Re: Cygwin struct alignment > > Google attribute packed as I don't remember the exact syntax, but I fail > to see how this actually helps your cause. > Thanks Brian. It should help me because it will hopefully guarantee that structures of a given size will occupy a predictable number of bytes. In other words, if the total bytes needed to accommodate a given struct's members is 138, the struct should occupy exactly 138 bytes - instead of being rounded up to 140 or whatever. After googling, I think the relevant compiler switch is -fpack-struct. I'll give it a try tomorrow but from my initial test (just compiling one source file) it produced hundreds of warnings of the type:- ignoring packed attribute on unpacked non-POD field. This seems to be generated for simple, conventional arrays, such as char myArray[64]; Is there anything available to suppress this warning? John -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/