From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mJnlL3UHfWJl3gUAWB0awg (envelope-from ) for ; Thu, 12 May 2022 09:11:17 -0400 Received: by simark.ca (Postfix, from userid 112) id B05D81E220; Thu, 12 May 2022 09:11:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A 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 2E3701E00D for ; Thu, 12 May 2022 09:11:16 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6868383D83D for ; Thu, 12 May 2022 13:11:15 +0000 (GMT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by sourceware.org (Postfix) with ESMTPS id BE7F5385627A for ; Thu, 12 May 2022 12:47:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE7F5385627A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id a5so3309617wrp.7 for ; Thu, 12 May 2022 05:47:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=yQ/ZnTTUUN4228hFazjTUK/nfFZ1e3/NPJgkYERUelA=; b=IlawpAg11K0dQi3wxALEH41qXVIMalJr88kFkgrnvd93BhHCA8nWs7xQX5w0x4R7c5 6U6k/MD/tujWeCOhw6uLLOhtGCJ1VXEfMOXCFpRys7pp1F7+lsvRMFTGl4MuyON3ITl6 VFW+gUAAIVJ2mfc8ZnRYatUvvN7H7N9P4LrvWbpRUlAC65tf1bbPbIlOjzclIzF3HME4 4+Okae6CEy74rslVryk6eUXbV/DkjpxBgj+pWDrPjkNv69tvXovr5FhVtTXwzHfWueCG TU3Tn3hrvDM6eGDwsYVdzHfrCXGChNF7x21dq0qcNx5voWEwijhwhkTBmUSkbGEGtPMQ ryEA== X-Gm-Message-State: AOAM530w5i6+0RQoV1LULSwn1TxgLaBCH/Ajcx8RluzaEXjM1sqTvjwP pRFOmPTcNrC7xU17LbfSz5M= X-Google-Smtp-Source: ABdhPJwEh1cYyg1V65uQBeXw568319cmIt2OKqb3rG9+RVR06c0TnD73RufreKccdqD7Mp997LY/lQ== X-Received: by 2002:a05:6000:782:b0:20c:8da2:cdc6 with SMTP id bu2-20020a056000078200b0020c8da2cdc6mr27507387wrb.537.1652359648545; Thu, 12 May 2022 05:47:28 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id o3-20020adfeac3000000b0020c66310845sm4065313wrn.55.2022.05.12.05.47.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 May 2022 05:47:27 -0700 (PDT) Message-ID: <60c929b0-f7e1-c0a7-ce44-daa06dbc860f@palves.net> Date: Thu, 12 May 2022 13:47:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH][gdb/testsuite] Fix gdb.cp/break-f-std-string.cc with older gcc Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org References: <20220512114555.GA21719@delia> From: Pedro Alves In-Reply-To: <20220512114555.GA21719@delia> Content-Type: text/plain; charset=UTF-8 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: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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. > + > +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; } Otherwise LGTM. Pedro Alves > +typedef __cxx11::string string; > +} > + > +#endif > +#endif > + > void > f (std::string s) > { >