From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Proposal: immediate strings Date: Wed, 06 Jun 2012 14:44:38 -0700 Organization: UCLA Computer Science Department Message-ID: <4FCFCF46.1000004@cs.ucla.edu> References: <4FBB51E7.6080601@yandex.ru> <4FC472E6.5020005@yandex.ru> <4FC47CE1.6050901@cs.ucla.edu> <4FC4D025.9020608@yandex.ru> <4FC4EA10.702@cs.ucla.edu> <4FC739B4.30408@yandex.ru> <4FC79DAD.5040904@cs.ucla.edu> <4FCEF52E.9090801@yandex.ru> <4FCEFB8F.8080106@cs.ucla.edu> <4FCF06EB.8030109@yandex.ru> <83ipf4wk00.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339019095 22979 80.91.229.3 (6 Jun 2012 21:44:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jun 2012 21:44:55 +0000 (UTC) Cc: Dmitry Antipov , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 06 23:44:53 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ScO23-0002Sy-Tx for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2012 23:44:48 +0200 Original-Received: from localhost ([::1]:42014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScO23-0000Xb-PC for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2012 17:44:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScO21-0000XJ-3Z for emacs-devel@gnu.org; Wed, 06 Jun 2012 17:44:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScO1z-00040O-MF for emacs-devel@gnu.org; Wed, 06 Jun 2012 17:44:44 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:50487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScO1x-0003zv-6O; Wed, 06 Jun 2012 17:44:41 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id BEBED39E8008; Wed, 6 Jun 2012 14:44:38 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z+zAazGHOEOI; Wed, 6 Jun 2012 14:44:38 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 68BDB39E8007; Wed, 6 Jun 2012 14:44:38 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: <83ipf4wk00.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150806 Archived-At: On 06/06/2012 08:14 AM, Eli Zaretskii wrote: >> > unsigned long x : BITS_PER_PTRDIFF_T - 1; >> > unsigned y : 1; >> > } >> > >> > works even if BITS_PER_PTRDIFF_T < BITS_PER_LONG. > But only on LP64 hosts, right? Yes, I suppose the bitfield type would be unsigned long long on hosts where ptrdiff_t is too wide for unsigned long; this is something that be determined via something like "#if ULONG_MAX < PTRDIFF_MAX". Or perhaps it'd be simpler to say this: size_t x : BITS_PER_PTRDIFF_T - 1; unsigned y : 1; if that's portable in practice.