]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/ChangeLog
Reject ambiguous C++ field accesses (PR exp/26602)
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
index 26623c6067c8ce14d23b4a653fba67c4a537c1c1..63ed7e4a5a4286a37aa529cb6e4a6a35fbc016ca 100644 (file)
@@ -1,3 +1,18 @@
+2020-10-12  Pedro Alves  <pedro@palves.net>
+
+       PR exp/26602
+       * valops.c (struct struct_field_searcher): New.
+       (update_search_result): Rename to ...
+       (struct_field_searcher::update_result): ... this.  Simplify
+       prototype.  Record all found fields.
+       (do_search_struct_field): Rename to ...
+       (struct_field_searcher::search): ... this.  Simplify prototype.
+       Maintain stack of visited baseclass path.  Call update_result for
+       fields too.  Keep searching fields in baseclasses instead of
+       stopping at the first found field.
+       (search_struct_field): Use struct_field_searcher.  When looking
+       for fields, report ambiguous access attempts.
+
 2020-10-11  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * frame.c (inside_main_func): Check full symbols as well as