From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3917 invoked by alias); 8 Feb 2017 22:27:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2224 invoked by uid 89); 8 Feb 2017 22:27:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:c0a7033, H*i:sk:c0a7033, H*MI:sk:c0a7033 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Feb 2017 22:27:00 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F1F7C05AA66; Wed, 8 Feb 2017 22:27:00 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v18MQvNd000549; Wed, 8 Feb 2017 17:26:59 -0500 Subject: Re: [RFA 1/5] Remove some ui_out-related cleanups from Python To: Trevor Saunders , Tom Tromey References: <20170115134253.24018-1-tom@tromey.com> <20170115134253.24018-2-tom@tromey.com> <20170116113021.sar3yh5ivykpqmbw@ball> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <80382c98-bdc1-fafd-2825-76f8d6fc24f7@redhat.com> Date: Wed, 08 Feb 2017 22:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00207.txt.bz2 On 02/08/2017 05:28 PM, Pedro Alves wrote: > I wondered about making m_instantiated a char, so that optional would > pack even better when sizeof or alignof T is small, and thus ends up being > no cost in those cases space-wise. Though maybe that ends up being > worse / not so efficient generated code -wise, or GCC would do it too? > In any case, since GCC doesn't do that, if/when we ever move to C++17, > we'd lose that again anyway. Eh, now that I check I see that sizeof bool == 1, and looking at GCC's sources, I see it's like that for almost all ports. Somehow I misremembered this and thought it was sizeof(int). Thanks, Pedro Alves