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] C++ operators do not resolve through typedefs


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


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