From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WPvwIULAImB4YwAAWB0awg (envelope-from ) for ; Tue, 09 Feb 2021 12:02:58 -0500 Received: by simark.ca (Postfix, from userid 112) id 7E1C71EF4F; Tue, 9 Feb 2021 12:02:58 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FSL_HELO_FAKE,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 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 2D0201E590 for ; Tue, 9 Feb 2021 12:02:58 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A8ED53846078; Tue, 9 Feb 2021 17:02:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8ED53846078 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612890177; bh=J8JUmwy2N2BWFDPTnqbsJ55K0xz336cJ/QhJkyLNPs8=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XHvH2dMA0exlRNbVHyFiqv0ytVvLt27UF9KHD1qth9wlF2CsQ6l5+xhXpvaH+JnTw E+ezAzEPvlDWwly7DIEiHANWGN0NH5mftf66dY4zAAdyXFyF/+0yu9hY+4Lb5L5NRj X5mapWpRjSbm5tipeiTOaHC6/VbiRCKy/muoLhFM= Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 873343854816 for ; Tue, 9 Feb 2021 17:02:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 873343854816 Received: by mail-lf1-x136.google.com with SMTP id d3so29398586lfg.10 for ; Tue, 09 Feb 2021 09:02:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J8JUmwy2N2BWFDPTnqbsJ55K0xz336cJ/QhJkyLNPs8=; b=Vgu8YUo/yW3A7h7CE6C8NfCu/O8JVLoWnhLedg0a1kyNLcOxZB1FiWrz7q+T87UNMr nyv1rSquuy24h/oLtdQCzskPJGmKVDAq8G5lY9ge1DzKfxA5hguasXZrvLBFRpI9mDFo IYy5XXOyAUN0CQPNxHxeaCU6zMT2iIp1yisH27wNgSH6lvP/Im9L6AwxHGgJQwtI8MoM cbGE5NlUh8lXASKzSTfFOi2Ck7YTQ4P3zhVUfxZUjG0M0BzUhjADB/G2hiIBO8ZQsR/f ZWOGR2SkVM5JWIAhbMIu5s9CaYQAQ9gICz196now8gq2/dmgf/M+Cj0x27RZmMAKGYF6 ymUg== X-Gm-Message-State: AOAM530YAKVYxG7wLM3SjMT72i3xm0NeQgA3WXiR1M3s1ux2XZ6L022C 8AMo5utgeC2XkykGSx/CYTXABFHmroQ= X-Google-Smtp-Source: ABdhPJyVP1E6SMRnOuC2rqQ6udv7/WlqdTgLHkqBUUlZquIMBMivpDZAdbWQHhCx4V4oIAQKemGrYQ== X-Received: by 2002:ac2:46c4:: with SMTP id p4mr14089450lfo.579.1612890172313; Tue, 09 Feb 2021 09:02:52 -0800 (PST) Received: from gmail.com ([2a03:1b20:4:f011::14d]) by smtp.gmail.com with ESMTPSA id t22sm1130957ljj.119.2021.02.09.09.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 09:02:51 -0800 (PST) Date: Tue, 9 Feb 2021 18:03:26 +0100 To: Tom Tromey Subject: Re: [PATCH] arc: Fix gcc-4.8 compilation failure for arc.c Message-ID: References: <20210209091209.7363-1-shahab.vahedi@gmail.com> <87mtwdcmyt.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mtwdcmyt.fsf@tromey.com> 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: Shahab Vahedi via Gdb-patches Reply-To: Shahab Vahedi Cc: Shahab Vahedi , Shahab Vahedi via Gdb-patches Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Tue, Feb 09, 2021 at 07:52:42AM -0700, Tom Tromey wrote: > Shahab> target_desc *tdesc = arc_create_target_description (features); > > Shahab> - /* Add the newly created target description to the repertoire. */ > Shahab> - arc_tdesc_cache.emplace (features, tdesc); > Shahab> + /* Add the newly created target description to the repertoire. > Shahab> + PR build/27385: Use "target_desc_up ()" ctor explicitly. */ > Shahab> + arc_tdesc_cache.emplace (features, target_desc_up (tdesc)); > > Shahab> return tdesc; > > I was going to suggest that arc_create_target_description return a > target_desc_up, but when I look at the code, I see it already does, and > that this line is different: > > arc_tdesc_cache.emplace (features, std::move (tdesc)); > > So I suspect this is already fixed. It is fixed in the trunk [1][2]. However, those are big patches. I think it is better (safer?) to keep the fix small like the one for RISCV [3]. Cheers, Shahab [1] gdb: Have allocate_target_description return a unique_ptr https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=51a948fdf0e [2] gdb: Delay releasing target_desc_up in more cases https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bbb826f5e92 [3] [gdb/build] Fix missing implicit constructor call with gcc 4.8 https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=38f8aa06d9c