From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: <gdb-patches@sourceware.org>, Keith Seitz <keiths@redhat.com>
Subject: Re: [PATCH] Fix compile-cplus-types.c build errors
Date: Thu, 30 Aug 2018 15:06:00 -0000 [thread overview]
Message-ID: <87sh2v3ndq.fsf@tromey.com> (raw)
In-Reply-To: <1535640184-20543-1-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Thu, 30 Aug 2018 10:43:04 -0400")
>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:
Simon> Fix the third one by comparing to 0 instead. I think the current
Simon> comparison simply uses the wrong enum type. Comparing to 0 seems like
Simon> the right thing to do, because we want to check whether any flags are
Simon> specified.
I think this is fine, but at the same time, it seems reasonable to me to
want to compare an enum flags object against an enumerator from the
underlying type. So maybe enum_flags should have operator== and operator!=.
What do you think of this? I am trying to think of a counter-example
where this would cause problems.
Simon> * compile/compile-cplus-types.c
Simon> (compile_cplus_instance::enter_scope): Take the address of scope
Simon> object.
Simon> (compile_cplus_instance::leave_scope): Likewise.
Simon> (compile_cplus_instance::convert_qualified_base): Compare quals
Simon> to 0.
Looks good.
Tom
next prev parent reply other threads:[~2018-08-30 15:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 14:43 Simon Marchi
2018-08-30 15:05 ` Joel Brobecker
2018-08-30 15:06 ` Tom Tromey [this message]
2018-08-30 15:13 ` Simon Marchi
2018-08-30 15:28 ` Tom Tromey
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=87sh2v3ndq.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=simon.marchi@ericsson.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