* [PATCH][pushed] VR: mitigate -Wfinal-dtor-non-final-class clang warnings
@ 2022-08-16 9:30 Martin Liška
0 siblings, 0 replies; only message in thread
From: Martin Liška @ 2022-08-16 9:30 UTC (permalink / raw)
To: gcc-patches
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-16 9:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 9:30 [PATCH][pushed] VR: mitigate -Wfinal-dtor-non-final-class clang warnings Martin Liška
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).