From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10439 invoked by alias); 1 Apr 2003 00:11:20 -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 10431 invoked from network); 1 Apr 2003 00:11:19 -0000 Received: from unknown (HELO smtp1.euronet.nl) (194.134.35.133) by sources.redhat.com with SMTP; 1 Apr 2003 00:11:19 -0000 Received: from koffie.nl (unknown [194.134.214.37]) by smtp1.euronet.nl (Postfix) with ESMTP id 349FB67260; Tue, 1 Apr 2003 02:11:15 +0200 (MEST) Message-ID: <3E88D929.70900@koffie.nl> Date: Tue, 01 Apr 2003 00:11:00 -0000 From: Segher Boessenkool User-Agent: Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en MIME-Version: 1.0 To: Falk Hueffner Cc: gcc@gcc.gnu.org Subject: Re: long long bit-fields References: <87of3taur5.fsf@student.uni-tuebingen.de> <3E87B155.3020408@koffie.nl> <87wuig2gcr.fsf@student.uni-tuebingen.de> In-Reply-To: <87wuig2gcr.fsf@student.uni-tuebingen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00000.txt.bz2 Falk Hueffner wrote: > 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? Yes. But IMHO, of course. Segher