From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NEF/Gu0HfWKR3gUAWB0awg (envelope-from ) for ; Thu, 12 May 2022 09:13:17 -0400 Received: by simark.ca (Postfix, from userid 112) id 5EE731E220; Thu, 12 May 2022 09:13:17 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=a93HzeZB; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D4C291E00D for ; Thu, 12 May 2022 09:13:16 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 407903857349 for ; Thu, 12 May 2022 13:13:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 407903857349 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652361196; bh=RXzUjqkndHqo/AC6RJyCTf8qN3ddTt1bdphYGPN/Cus=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=a93HzeZBk3863Dv9bpo5Fvk8PFA6EtQ7STE6KE+C3lsCTi3vhaf1BhEXS8WgkKeN5 HlOk39iWo6+U+ZH3DHG6VUNrY2FkhGYIWOfgB4fwsHV4m7fwyspsOLomoy4hKSL1bc 0aP/3QIrBWkx2Bplt4WGRbeT4NRDsR6r9FjCjh7c= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id EE6063839C62 for ; Thu, 12 May 2022 12:57:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE6063839C62 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2AB8D21C33; Thu, 12 May 2022 12:57:34 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 13A0313ABE; Thu, 12 May 2022 12:57:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kPHNAj4EfWLYJQAAMHmgww (envelope-from ); Thu, 12 May 2022 12:57:34 +0000 Message-ID: <304ed9e6-1375-9235-900c-5b09bc8ca700@suse.de> Date: Thu, 12 May 2022 14:57:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH][gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc Content-Language: en-US To: Pedro Alves , gdb-patches@sourceware.org References: <20220512114555.GA21719@delia> <60c929b0-f7e1-c0a7-ce44-daa06dbc860f@palves.net> In-Reply-To: <60c929b0-f7e1-c0a7-ce44-daa06dbc860f@palves.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 5/12/22 14:47, Pedro Alves wrote: > On 2022-05-12 12:45, Tom de Vries wrote: > >> [gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc >> >> --- >> gdb/testsuite/gdb.cp/break-f-std-string.cc | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/gdb/testsuite/gdb.cp/break-f-std-string.cc b/gdb/testsuite/gdb.cp/break-f-std-string.cc >> index 454ab4c42ea..cbbfeebac60 100644 >> --- a/gdb/testsuite/gdb.cp/break-f-std-string.cc >> +++ b/gdb/testsuite/gdb.cp/break-f-std-string.cc >> @@ -17,6 +17,20 @@ >> >> #include >> >> +#if _GLIBCXX_USE_CXX11_ABI == 1 >> +#if defined (__GNUC__) && (__GNUC__ >= 5) && (__GNUC__ <= 8) >> + >> +// Work around missing std::string typedef before gcc commit >> +// "Define std::string and related typedefs outside __cxx11 namespace". > > Since we try to follow the GDB conventions in the tests too, this should > use /**/ comments. > Ack, fixed. >> + >> +namespace std { >> +using namespace __cxx11; > > Why is this "using namespace __cxx11;" needed? I guess something about the > "related typedefs" mentioned in the comment? The test passes for me without > that, on GCC 6.5 (the only affected compiler I have handy atm), like: > > namespace std { > typedef __cxx11::string string; > } > Works for me as well, so removed. > Otherwise LGTM. > Thanks for the review, committed. Thanks, - Tom > Pedro Alves > >> +typedef __cxx11::string string; >> +} >> + >> +#endif >> +#endif >> + >> void >> f (std::string s) >> { >> >