This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/5] Remove some ui_out-related cleanups from Python
- From: Pedro Alves <palves at redhat dot com>
- To: Trevor Saunders <tbsaunde at tbsaunde dot org>, Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 8 Feb 2017 22:26:56 +0000
- Subject: Re: [RFA 1/5] Remove some ui_out-related cleanups from Python
- Authentication-results: sourceware.org; auth=none
- References: <20170115134253.24018-1-tom@tromey.com> <20170115134253.24018-2-tom@tromey.com> <20170116113021.sar3yh5ivykpqmbw@ball> <c0a70339-49c3-a087-bebf-ecfdd2cc32ca@redhat.com>
On 02/08/2017 05:28 PM, Pedro Alves wrote:
> I wondered about making m_instantiated a char, so that optional<T> 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