From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25567 invoked by alias); 9 Jan 2008 22:22:06 -0000 Received: (qmail 25559 invoked by uid 22791); 9 Jan 2008 22:22:06 -0000 X-Spam-Check-By: sourceware.org Received: from elasmtp-junco.atl.sa.earthlink.net (HELO elasmtp-junco.atl.sa.earthlink.net) (209.86.89.63) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Jan 2008 22:21:41 +0000 Received: from [76.167.204.177] (helo=PAULD) by elasmtp-junco.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1JCjIp-0001sg-8r for ecos-discuss@ecos.sourceware.org; Wed, 09 Jan 2008 17:21:39 -0500 From: "Paul D. DeRocco" To: Date: Wed, 09 Jan 2008 22:22:00 -0000 Message-ID: <014701c8530d$ff055940$887ba8c0@PAULD> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook, Build 10.0.6822 In-Reply-To: <7b2a34230801091355n355da963lce9b0264e1c99653@mail.gmail.com> X-ELNK-Trace: bd7d5d4e6f8f652c74cfc7ce3b1ad11381c87f5e5196068849b9cc0c75f2f13b8eabb7e97e87c6b5350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] pragma pack X-SW-Source: 2008-01/txt/msg00035.txt.bz2 > From: Bronislav Gabrhelik >=20 > Beware of bad alignment of timestamp field. Some processors=20 > might raise an exception/interrupt when you use the int like=20 > operation directly on field (including assignment &=20 > evaluation). You should copy out/in this by memcpy into/from=20 > temporary variable of the same type when you need to do some=20 > integer computing on this field. In other case your code=20 > might not be portable. I think that's the point of the __packed__ attribute: it forces the compiler for any machine on which it matters to do the necessary byte packing/unpacking automagically. I know that's what the Gnu ARM compiler does. --=20 Ciao, Paul D. DeRocco Paul mailto:pderocco@ix.netcom.com=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss