Hi, When GCC is compiled with clang, it emits a warning that dom_oracle::next_relation is not marked as override even though it does override a virtual function of its ancestor. This patch marks it as such to silence the warning and for the sake of consistency.
There are other member functions in the class which are marked as final override but this particular function is in the protected section so I decided to just mark it as override. Bootstrapped and tested on x86_64-linx. OK for master? Alternatively, as with all of these clang warning issues, I'm perfectly happy to add an entry to contrib/filter-clang-warnings.py to ignore the warning instead. Thanks, Martin gcc/ChangeLog: 2025-06-24 Martin Jambor <mjam...@suse.cz> * value-relation.h (class dom_oracle): Mark member function next_relation as override. --- gcc/value-relation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/value-relation.h b/gcc/value-relation.h index 1081877ccca..87f0d856fab 100644 --- a/gcc/value-relation.h +++ b/gcc/value-relation.h @@ -235,7 +235,7 @@ public: void dump (FILE *f) const final override; protected: virtual relation_chain *next_relation (basic_block, relation_chain *, - tree) const; + tree) const override; bool m_do_trans_p; bitmap m_tmp, m_tmp2; bitmap m_relation_set; // Index by ssa-name. True if a relation exists -- 2.49.0