public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Fix sorting of enum values in FlagEnumerationPrinter
Date: Tue, 19 Jan 2016 11:02:00 -0000	[thread overview]
Message-ID: <569E17C5.6080909@redhat.com> (raw)
In-Reply-To: <1453177390-13881-1-git-send-email-simon.marchi@polymtl.ca>

Thanks for catching this.

I find it surprising that the printer doesn't respect the
order of the values as they're defined though.  Shouldn't we
remove the sort line entirely, thus keeping the
existing behavior?  I couldn't find mention of the sorting
in the documentation either.

Or, maybe the printer doesn't work correctly if the "overlapping"
value (which I think it the whole point of this printer) is defined
before the particular values, like, e.g.:

 enum flag_enum
   {
     ALL = 1 | 2 | 4,
     FLAG_2 = 2,
     FLAG_3 = 4,
     FLAG_1 = 1,
   };

?

On 01/19/2016 04:23 AM, Simon Marchi wrote:

> +
>  enum flag_enum
>    {
> -    FLAG_1 = 1,
> +    /* Define the enumration values in an unsorted manner to verify that we
> +       effectively sort them by value.  */

typo: "enumration".

Thanks,
Pedro Alves

  parent reply	other threads:[~2016-01-19 11:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19  4:23 Simon Marchi
2016-01-19  4:23 ` [PATCH 2/2] Fix enum flag with Python 3 Simon Marchi
2016-01-19 11:03   ` Pedro Alves
2016-01-19 16:08     ` Simon Marchi
2016-01-19 11:02 ` Pedro Alves [this message]
2016-01-19 16:41   ` [PATCH 1/2] Fix sorting of enum values in FlagEnumerationPrinter Simon Marchi
2016-01-20 14:41     ` Pedro Alves
2016-01-20 18:03       ` Simon Marchi
2016-01-20 18:12         ` Simon Marchi

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=569E17C5.6080909@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).