From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id EBE093858422 for ; Thu, 18 Nov 2021 20:50:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EBE093858422 X-ASG-Debug-ID: 1637268654-0c856e2e46178960001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id s5AhjlMjAYeQYKzZ (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2021 15:50:54 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from epycamd.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id EA6E3441D65; Thu, 18 Nov 2021 15:50:53 -0500 (EST) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/2] gdb: fix array-view-selftests.c build with g++ 4.8 Date: Thu, 18 Nov 2021 15:50:53 -0500 X-ASG-Orig-Subj: [PATCH 2/2] gdb: fix array-view-selftests.c build with g++ 4.8 Message-Id: <20211118205053.2429353-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211118205053.2429353-1-simon.marchi@efficios.com> References: <20211118205053.2429353-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1637268654 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 1109 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.94047 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Spam-Status: No, score=-19.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 20:50:56 -0000 When building with g++ 4.8, I get: CXX unittests/array-view-selftests.o /home/smarchi/src/binutils-gdb/gdb/unittests/array-view-selftests.c:123:42: error: expected 'class' before 'Container' template typename Container> ^ I am no C++ template expert, but it looks like if I change "typename" for "class", as the compiler kind of suggests, the code compiles. Change-Id: I9c3edd29fb2b190069f0ce0dbf3bc3604d175f48 --- gdb/unittests/array-view-selftests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/unittests/array-view-selftests.c b/gdb/unittests/array-view-selftests.c index fe211a647b5..9df48db3912 100644 --- a/gdb/unittests/array-view-selftests.c +++ b/gdb/unittests/array-view-selftests.c @@ -120,7 +120,7 @@ check () /* Check that there's no container->view conversion for containers of derived types or subclasses. */ -template typename Container> +template class Container> static constexpr bool check_ctor_from_container () { -- 2.33.1