public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/100463] many errors using GTY and hash_map
Date: Thu, 06 May 2021 21:19:11 +0000	[thread overview]
Message-ID: <bug-100463-4-CU5IeoI39R@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100463-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100463

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
As it turns out, the hash_map primary template is incomplete.  Defining the
following member fixes that error only to expose another:

index 0779c930f0a..c07bd04704f 100644
--- a/gcc/hash-map.h
+++ b/gcc/hash-map.h
@@ -114,6 +114,11 @@ class GTY((user)) hash_map

     static void
       pch_nx_helper (unsigned int, gt_pointer_operator, void *)
+       {
+       }
+
+    static void
+      pch_nx_helper (long int, gt_pointer_operator, void *)
        {
        }

In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h: In instantiation of ‘static void hash_map<
<template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>
>::hash_entry::pch_nx(hash_map< <template-parameter-1-1>,
<template-parameter-1-2>, <template-parameter-1-3> >::hash_entry&) [with KeyId
= int_hash<long int, 0, 9223372036854775807>; Value = int; Traits =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>]’:
/ssd/src/gcc/trunk/gcc/hash-table.h:1198:17:   required from ‘void
gt_pch_nx(hash_table<E>*) [with D = hash_map<int_hash<long int, 0,
9223372036854775807>, int>::hash_entry]’
/ssd/src/gcc/trunk/gcc/hash-map.h:319:13:   required from ‘void
gt_pch_nx(hash_map<K, V, H>*) [with K = int_hash<long int, 0,
9223372036854775807>; V = int; H =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>]’
./gt-except.h:97:19:   required from here
/ssd/src/gcc/trunk/gcc/hash-map.h:87:12: error: call of overloaded
‘gt_pch_nx(hash_map<int_hash<long int, 0, 9223372036854775807>, int>::Key&)’ is
ambiguous
  gt_pch_nx (e.m_key);
  ~~~~~~~~~~^~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:247,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/ggc.h:341:1: note: candidate: ‘void gt_pch_nx(int)’
 gt_pch_nx (int)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/ggc.h:346:1: note: candidate: ‘void gt_pch_nx(unsigned
int)’
 gt_pch_nx (unsigned int)
 ^~~~~~~~~

  parent reply	other threads:[~2021-05-06 21:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 21:01 [Bug other/100463] New: " msebor at gcc dot gnu.org
2021-05-06 21:01 ` [Bug other/100463] " msebor at gcc dot gnu.org
2021-05-06 21:02 ` msebor at gcc dot gnu.org
2021-05-06 21:19 ` msebor at gcc dot gnu.org [this message]
2021-05-06 21:23 ` msebor at gcc dot gnu.org
2021-05-06 21:35 ` msebor at gcc dot gnu.org
2021-05-07  7:18 ` rguenth at gcc dot gnu.org
2021-05-21  1:50 ` msebor at gcc dot gnu.org
2021-05-27 19:41 ` cvs-commit at gcc dot gnu.org
2021-05-27 19:42 ` msebor at gcc dot gnu.org

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=bug-100463-4-CU5IeoI39R@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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: link
Be 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).