public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb] Fix build breaker with gcc 4.8 Date: Wed, 19 Jun 2019 14:56:00 -0000 [thread overview] Message-ID: <20190619145633.97074.qmail@sourceware.org> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2427 bytes --] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f23f598e28ad39dac7ae87cdc400d2f6b27dc403 commit f23f598e28ad39dac7ae87cdc400d2f6b27dc403 Author: Tom de Vries <tdevries@suse.de> Date: Wed Jun 19 16:56:23 2019 +0200 [gdb] Fix build breaker with gcc 4.8 When compiling with gcc 4.8, we run into: ... /usr/include/c++/4.8/bits/unordered_map.h:100:18: required from \ âclass std::unordered_map<sect_offset, std::vector<sect_offset> >â src/gdb/dwarf2read.h:260:5: required from here /usr/include/c++/4.8/bits/hashtable_policy.h:1070:12: error: invalid use of \ incomplete type âstruct std::hash<sect_offset>â ... Fix this by setting the Hash template parameter of the unordered_map to gdb::hash_enum<sect_offset>, rather than using the default std::hash<sect_offset>. Build and reg-tested on x86_64-linux with gcc 4.8. gdb/ChangeLog: 2019-06-19 Tom de Vries <tdevries@suse.de> * dwarf2read.h (abstract_to_concrete): Change type to std::unordered_map<sect_offset, std::vector<sect_offset>, gdb::hash_enum<sect_offset>>. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/dwarf2read.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c40b7d4..0937823 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-06-19 Tom de Vries <tdevries@suse.de> + + * dwarf2read.h (abstract_to_concrete): Change type to + std::unordered_map<sect_offset, std::vector<sect_offset>, + gdb::hash_enum<sect_offset>>. + 2019-06-19 Tom Tromey <tromey@adacore.com> * ada-lang.c (ada_evaluate_subexp) <case OP_ATR_FIRST>: Handle diff --git a/gdb/dwarf2read.h b/gdb/dwarf2read.h index 776860e..7113cfd 100644 --- a/gdb/dwarf2read.h +++ b/gdb/dwarf2read.h @@ -24,6 +24,7 @@ #include "dwarf-index-cache.h" #include "filename-seen-cache.h" #include "gdb_obstack.h" +#include "common/hash_enum.h" /* Hold 'maintenance (set|show) dwarf' commands. */ extern struct cmd_list_element *set_dwarf_cmdlist; @@ -256,7 +257,8 @@ public: /* Mapping from abstract origin DIE to concrete DIEs that reference it as DW_AT_abstract_origin. */ - std::unordered_map<sect_offset, std::vector<sect_offset>> + std::unordered_map<sect_offset, std::vector<sect_offset>, \ + gdb::hash_enum<sect_offset>> \ abstract_to_concrete; };
reply other threads:[~2019-06-19 14:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190619145633.97074.qmail@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).