public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/31420] Use std::filesystem::remove_all in compile.c
Date: Wed, 03 Apr 2024 12:54:00 +0000	[thread overview]
Message-ID: <bug-31420-4717-7PVpLS4HAC@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31420-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31420

--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Lancelot SIX <lsix@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7bba0ad08576309763e3f41193eaa93025e10b8b

commit 7bba0ad08576309763e3f41193eaa93025e10b8b
Author: Lancelot SIX <lancelot.six@amd.com>
Date:   Sun Mar 3 16:47:56 2024 +0000

    gdb/compile: Use std::filesystem::remove_all in cleanup

    In a previous review, I noticed that some code in gdb/compile/compile.c
    could use c++17's `std::filesystem::remove_all` instead of using some
    `system ("rm -rf ...");`.

    This patch implements this.

    Note that I use the noexcept overload of std::filesystem::remove_all and
    explicitly check for an error code.  This means that this code called
    during the cleanup procedure cannot throw, and does not risk preventing
    other cleanup functions to be called.

    Tested on x86_64-linux.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31420
    Change-Id: If5668bf3e15e66c020e5c3b4fa999f861690e4cf
    Approved-By: Tom Tromey <tom@tromey.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-04-03 12:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 17:02 [Bug gdb/31420] New: " tromey at sourceware dot org
2024-02-27 17:02 ` [Bug gdb/31420] " tromey at sourceware dot org
2024-02-27 17:25 ` tromey at sourceware dot org
2024-04-03 12:54 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-03 15:31 ` cvs-commit at gcc dot gnu.org
2024-04-04  7:37 ` lsix at lancelotsix dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31420-4717-7PVpLS4HAC@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).