This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] C++ operators do not resolve through typedefs
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 18 Feb 2011 11:17:10 -0700
- Subject: Re: [patch] C++ operators do not resolve through typedefs
- References: <20110218155751.GA3139@host1.dyn.jankratochvil.net>
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
The whole patch looks good to me.
Jan> * valarith.c (unop_user_defined_p): Resolve also TYPE_CODE_TYPEDEF.
The formulation of this check in binop_types_user_defined_p is simpler,
not involving a loop:
type1 = check_typedef (type1);
if (TYPE_CODE (type1) == TYPE_CODE_REF)
type1 = check_typedef (TYPE_TARGET_TYPE (type1));
[...]
return (TYPE_CODE (type1) == TYPE_CODE_STRUCT [...]
Tom