From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28447 invoked by alias); 31 Mar 2003 06:35:51 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28439 invoked from network); 31 Mar 2003 06:35:50 -0000 Received: from unknown (HELO mx01.uni-tuebingen.de) (134.2.3.11) by sources.redhat.com with SMTP; 31 Mar 2003 06:35:50 -0000 Received: from juist (semeai.Informatik.Uni-Tuebingen.De [134.2.15.66]) by mx01.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id h2V6ZhX6010757; Mon, 31 Mar 2003 08:35:47 +0200 Received: from falk by juist with local (Exim 3.36 #1 (Debian)) id 18zstN-000282-00; Mon, 31 Mar 2003 08:35:37 +0200 To: Segher Boessenkool Cc: gcc@gcc.gnu.org Subject: Re: long long bit-fields References: <87of3taur5.fsf@student.uni-tuebingen.de> <3E87B155.3020408@koffie.nl> From: Falk Hueffner Date: Mon, 31 Mar 2003 09:22:00 -0000 In-Reply-To: <3E87B155.3020408@koffie.nl> Message-ID: <87wuig2gcr.fsf@student.uni-tuebingen.de> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (cabbage) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-AntiVirus: checked by AntiVir Milter 1.0.0.8; AVE 6.18.0.3; VDF 6.18.0.20 X-SW-Source: 2003-03/txt/msg01790.txt.bz2 Segher Boessenkool writes: > Falk Hueffner wrote: > > PR c/6346, middle-end/7018 and target/9620 deal with long long > > bit-fields. [...] > > Correct (the integer promotions promote an unsigned integer > bit-field to a signed integer, if it fits). Okay. Then we can close middle-end/7018. Most other bit-field bugs seem to be caused by casts to the bit-field's type getting discarded erraneously, by the folder presumably. I'll try to have a look at that some time in the future. How about: struct { unsigned long long ull31a: 33; } x = { -1 }; printf("%016llx\n", (x.ull31a << 48) >> 48); We don't currently promote to signed long long if it fits. Should we? -- Falk