This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Type-safe wrapper for enum flags
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 17 Nov 2015 13:49:35 +0000
- Subject: Re: [PATCH] Type-safe wrapper for enum flags
- Authentication-results: sourceware.org; auth=none
- References: <1446144341-21267-1-git-send-email-palves at redhat dot com> <CA+C-WL8XvvJR_QnKkVX-Znkkk7zLr9COfQipsK8AMAhkuvedQQ at mail dot gmail dot com> <563897E6 dot 30006 at redhat dot com> <CA+C-WL9KKz2BUqc2N4DWkiON=v4JWJfSyuqLiAu9fJEpWfgofg at mail dot gmail dot com>
On 11/09/2015 01:24 PM, Patrick Palka wrote:
> FWIW the latest patch looks good to me.
Thanks. I've pushed the patch in now, along with Simon's follow up.
>
> BTW, I think GCC could make use of this enum_flags abstraction. When
> GCC moved to C++ it seems to have went the type-unsafe route regarding
> enum compatibility, converting "enum foo { ... };" to "enum foo_flags
> { ... }; typedef int foo;" which is a pretty inferior solution. Do you
> plan on incorporating this abstraction into GCC too? If not, I can
> help to do it.
Nope, I don't have plans for that. Feel free to run with it.
Thanks,
Pedro Alves