This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix compile-cplus-types.c build errors


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]