public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r15-27] Add a virtual vrange destructor.
Date: Sun, 28 Apr 2024 19:03:44 +0000 (GMT)	[thread overview]
Message-ID: <20240428190344.C18773858D37@sourceware.org> (raw)

https://gcc.gnu.org/g:a78dfb0fc83606e9b83b76575deb7e43300254fa

commit r15-27-ga78dfb0fc83606e9b83b76575deb7e43300254fa
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Wed Feb 21 09:33:19 2024 +0100

    Add a virtual vrange destructor.
    
    Richi mentioned in PR113476 that it would be cleaner to move the
    destructor from int_range to the base class.  Although this isn't
    strictly necessary, as there are no users, it is good to future proof
    things, and the overall impact is miniscule.
    
    gcc/ChangeLog:
    
            * value-range.h (vrange::~vrange): New.
            (int_range::~int_range): Make final override.

Diff:
---
 gcc/value-range.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/value-range.h b/gcc/value-range.h
index e7f61950a24..b7c83982385 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -95,6 +95,7 @@ public:
   virtual void set_zero (tree type) = 0;
   virtual void set_nonnegative (tree type) = 0;
   virtual bool fits_p (const vrange &r) const = 0;
+  virtual ~vrange () { }
 
   bool varying_p () const;
   bool undefined_p () const;
@@ -382,7 +383,7 @@ public:
   int_range (tree type);
   int_range (const int_range &);
   int_range (const irange &);
-  virtual ~int_range ();
+  ~int_range () final override;
   int_range& operator= (const int_range &);
 protected:
   int_range (tree, tree, value_range_kind = VR_RANGE);

                 reply	other threads:[~2024-04-28 19:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240428190344.C18773858D37@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.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).