From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13128 invoked by alias); 11 Mar 2009 10:47:32 -0000 Received: (qmail 13120 invoked by uid 22791); 11 Mar 2009 10:47:31 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from mx20.gnu.org (HELO mx20.gnu.org) (199.232.41.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Mar 2009 10:47:25 +0000 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhLy7-0005NR-Ad for gcc@gcc.gnu.org; Wed, 11 Mar 2009 06:47:23 -0400 Received: (qmail 19281 invoked from network); 11 Mar 2009 10:47:18 -0000 Received: from unknown (HELO wren.home) (paul@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Mar 2009 10:47:18 -0000 From: Paul Brook To: gcc@gcc.gnu.org Subject: Re: bitfields: types vs modes? Date: Wed, 11 Mar 2009 11:57:00 -0000 User-Agent: KMail/1.9.9 Cc: DJ Delorie References: <200903100433.n2A4XKNL011948@greed.delorie.com> In-Reply-To: <200903100433.n2A4XKNL011948@greed.delorie.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903111047.17419.paul@codesourcery.com> Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg00281.txt.bz2 On Tuesday 10 March 2009, DJ Delorie wrote: > One of our customers has a chip with memory-mapped peripheral > registers that need to be accessed in a specific mode. The registers > represent bitfields within the hardware, so a volatile struct is an > obvious choice to represent them in C. > > Comments? Alternatives? PR23623 (I suspect the status on that bug is incorrect, it's nt actually fixed). The ARM EABI defines semantics for volatile bitfields, and gcc gets this wrong. Paul