This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/16535] New: discrepancy between binop_user_defined_p and value_x_binop
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 07 Feb 2014 03:57:16 +0000
- Subject: [Bug exp/16535] New: discrepancy between binop_user_defined_p and value_x_binop
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16535
Bug ID: 16535
Summary: discrepancy between binop_user_defined_p and
value_x_binop
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: exp
Assignee: unassigned at sourceware dot org
Reporter: dje at google dot com
binop_user_defined_p returns true if either argument is a struct.
value_x_binop requires arg1 to be a struct.
This discrepancy is confusing.
value_x_binop is itself confused:
/* We know either arg1 or arg2 is a structure, so try to find the right
user defined function. Create an argument vector that calls
arg1.operator @ (arg1,arg2) and return that value (where '@' is any
binary operator which is legal for GNU C++).
and yet:
if (TYPE_CODE (check_typedef (value_type (arg1))) != TYPE_CODE_STRUCT)
error (_("Can't do that binary op on that type")); /* FIXME be explicit */
[i.e., it requires arg1 to be a struct]
--
You are receiving this mail because:
You are on the CC list for the bug.