Thanks for spotting this. Filip
On Wed 2025-06-25 16:03:20, Martin Jambor wrote: > Hi, > > It is customary to mark the gate and execute functions of the classes > representing passes as final override but this is missing in > pass_sccopy. This patch adds it which also silences clang warnings > about it. > > Bootstrapped and tested on x86_64-linux. Because of the precedent > elsewhere I consider this obvious and will commit it shortly. > > Thanks, > > Martin > > > gcc/ChangeLog: > > 2025-06-24 Martin Jambor <mjam...@suse.cz> > > * gimple-ssa-sccopy.cc (class pass_sccopy): Mark member functions > gate and execute as final override. > --- > gcc/gimple-ssa-sccopy.cc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/gimple-ssa-sccopy.cc b/gcc/gimple-ssa-sccopy.cc > index c93374572a9..341bae46080 100644 > --- a/gcc/gimple-ssa-sccopy.cc > +++ b/gcc/gimple-ssa-sccopy.cc > @@ -699,8 +699,8 @@ public: > {} > > /* opt_pass methods: */ > - virtual bool gate (function *) { return true; } > - virtual unsigned int execute (function *); > + virtual bool gate (function *) final override { return true; } > + virtual unsigned int execute (function *) final override; > opt_pass * clone () final override { return new pass_sccopy (m_ctxt); } > }; // class pass_sccopy > > -- > 2.49.0 >