public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH][pushed] VR: mitigate -Wfinal-dtor-non-final-class clang warnings
Date: Tue, 16 Aug 2022 11:30:58 +0200	[thread overview]
Message-ID: <9ceb4ece-8fba-e9b8-1c97-2e26a0670bbf@suse.cz> (raw)

Pushed as obvious.

Martin

Fixes:

gcc/value-range-storage.h:129:40: warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
gcc/value-range-storage.h:146:36: warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]

gcc/ChangeLog:

	* value-range-storage.h (class obstack_vrange_allocator): Mark
	  the class as final.
	(class ggc_vrange_allocator): Likewise.
---
 gcc/value-range-storage.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/value-range-storage.h b/gcc/value-range-storage.h
index 3fac5ea2f86..9cd6b9f7bec 100644
--- a/gcc/value-range-storage.h
+++ b/gcc/value-range-storage.h
@@ -119,7 +119,7 @@ class GTY (()) frange_storage_slot
   frange_props m_props;
 };
 
-class obstack_vrange_allocator : public vrange_allocator
+class obstack_vrange_allocator final: public vrange_allocator
 {
 public:
   obstack_vrange_allocator ()
@@ -139,7 +139,7 @@ private:
   obstack m_obstack;
 };
 
-class ggc_vrange_allocator : public vrange_allocator
+class ggc_vrange_allocator final: public vrange_allocator
 {
 public:
   ggc_vrange_allocator () { }
-- 
2.37.1


                 reply	other threads:[~2022-08-16  9:30 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=9ceb4ece-8fba-e9b8-1c97-2e26a0670bbf@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@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).