public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Tom Tromey <tom@tromey.com>,
	Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb: don't treat empty enums as flag enums
Date: Mon, 27 Feb 2023 14:15:25 +0000	[thread overview]
Message-ID: <87zg8zi48y.fsf@redhat.com> (raw)
In-Reply-To: <87fsayn6ub.fsf@tromey.com>

Tom Tromey <tom@tromey.com> writes:

>>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Andrew> In C++ it is possible to use an empty enum as a strong typedef.  For
> Andrew> example, a user could write:
>
> Andrew>   enum class my_type : unsigned char {};
>
> Andrew> Now my_type can be used like 'unsigned char' except the compiler will
> Andrew> not allow implicit conversion too and from the native 'unsigned char'
> Andrew> type.
>
> ...
> Andrew> I propose adding an extra check here; that is, an empty enum should
> Andrew> never be a flag enum.
>
> Looks good to me, thank you.
>
> Reviewed-By: Tom Tromey <tom@tromey.com>

Pushed.

Thanks,
Andrew


      reply	other threads:[~2023-02-27 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 13:53 Andrew Burgess
2023-02-20 13:58 ` Andreas Schwab
2023-02-20 14:29   ` Andrew Burgess
2023-02-21 19:42 ` Tom Tromey
2023-02-27 14:15   ` Andrew Burgess [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zg8zi48y.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).