Add new argument NOSIDE to find_overload_match.
authorSiva Chandra <sivachandra@chromium.org>
Wed, 9 Jul 2014 17:25:48 +0000 (10:25 -0700)
committerSiva Chandra <sivachandra@chromium.org>
Sat, 16 Aug 2014 01:28:59 +0000 (18:28 -0700)
commite66d44466912ecf581f6b67ff299d064c7bf4f1a
tree447ff1714ecb2c4bce548c8565e0102feb489cc8
parent940df408121be31beed22ef7a5ad133cb1592726
Add new argument NOSIDE to find_overload_match.

This is a fix for PR c++/17132.
If this new argument is set to EVAL_AVOID_SIDE_EFFECTS, then the object's
memory will not be read while picking the best overload match.

gdb/

* eval.c: Update all calls to find_overload_match.
* valarith.c: Likewise.
(value_user_defined_cpp_op, value_user_defined_op): New
argument NOSIDE.  Update all callers.
* valops.c (find_overload_match): New argument NOSIDE.
* value.h (find_overload_match): Update signature.

gdb/testsuite

* gdb.cp/pr17132.cc: New file.
* gdb.cp/pr17132.exp: New file.
gdb/ChangeLog
gdb/eval.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/pr17132.cc [new file with mode: 0644]
gdb/testsuite/gdb.cp/pr17132.exp [new file with mode: 0644]
gdb/valarith.c
gdb/valops.c
gdb/value.h