From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id 3ECDA3858409 for ; Fri, 15 Sep 2023 16:23:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3ECDA3858409 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-792979d4cb5so80118339f.2 for ; Fri, 15 Sep 2023 09:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1694795004; x=1695399804; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LQgw4a4zmoep7KVDBiVKe8BIfL8JHhWukiHl7xM0oXo=; b=JqY0Dn7aJgqFKPiN3uhOScNvvYUp+C/rfd8v9y63dP6eZXk15wfzmEwrzO+f4gEfOg w06uSumdb5PGs34XyL3YAMLkjGbF5ZUBXuyYLAUS0XegwBZgQtndOLAIQNghDMT5Mvim 5kFrLb6wUboVqRzHgo5tyYJlizOmZp5EELa8VjEJdpVE0RWXJ0D/UlWP29tjXkWyIFxv jFY896wgMKcY6NPgMoKGBiFQz4DmS3mHpUAOybOOosPw3SZ25evLbXViKnpDs7mWxpr7 R8mXfOvu5DcbdvzBQLu5bQbO6REBHKQuVJe1dM+nSeCbnTFxYE4F8SKS7P4bZYyTNS6L /7GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694795004; x=1695399804; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LQgw4a4zmoep7KVDBiVKe8BIfL8JHhWukiHl7xM0oXo=; b=FTklCuVQfmkLNSQOSnYnqL6LB3YEG/zxO+bsvZarInCwH/kupRejVzM1JzRutZ8heE NG9xIJ99J62Qs+1BFE9WAPjBAamlEip05UfefKXwRGZbSCET4kmSX2fBvjGDG2kW4rHY ADxgf+0n2dOvoT+uwsZvutlau5QwrHWPvyoCd8Ie0BZFDMjfM79aDtC1iodU+jP72KfS x/WwS79CO9xiATAxNEm3ISYpUvqFVonzZutw0s1fmMxdDt4KpAgCxr3IVB/+3n1DlQHy WYBN+QyHtHQeT9eBaEVwE8nmasokqcqpziUh1Fv8ZIVcPBkjENwMai3zA05tUUapHNYF zWnw== X-Gm-Message-State: AOJu0Yz3073oyJ09o/aq0XjTpCBd49A7aADJmxQ9xvqDmwvMBTsGqnGw qcErWdITt7fHBYm5WECcM4V1PELSaFF/TrnjcGxeOQ== X-Google-Smtp-Source: AGHT+IGFoUH3jJiYqOkxBfQcMbA7SyW7IB++8Dmsi3OqQZkSTxfzq7Rk8q7EHvWANzpjTWRHNwNw4A== X-Received: by 2002:a5d:84c5:0:b0:790:f866:d71b with SMTP id z5-20020a5d84c5000000b00790f866d71bmr2060210ior.13.1694795004523; Fri, 15 Sep 2023 09:23:24 -0700 (PDT) Received: from localhost.localdomain (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id n23-20020a02cc17000000b0041e328a2084sm1093429jap.79.2023.09.15.09.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 09:23:24 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey , Simon Marchi Subject: [pushed] Fix build failure with GCC 4.8 Date: Fri, 15 Sep 2023 10:23:12 -0600 Message-Id: <20230915162312.2872477-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: A user pointed out that the build failed with GCC 4.8. The problem was that the form used by the std::hash specialization of ptid_t was not accepted. This patch rewrites this code into a form that is acceptable to the older compiler. Approved-By: Simon Marchi --- gdbsupport/ptid.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdbsupport/ptid.h b/gdbsupport/ptid.h index f8644d47633..96c7d9c8bfd 100644 --- a/gdbsupport/ptid.h +++ b/gdbsupport/ptid.h @@ -157,8 +157,10 @@ class ptid_t tid_type m_tid; }; +namespace std +{ template<> -struct std::hash +struct hash { size_t operator() (const ptid_t &ptid) const { @@ -169,6 +171,7 @@ struct std::hash + long_hash (ptid.tid ())); } }; +} /* The null or zero ptid, often used to indicate no process. */ -- 2.40.1