From: Martin Jambor Date: Wed, 25 Jun 2025 14:48:44 +0000 (+0200) Subject: Mark rtl_avoid_store_forwarding functions final override X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb1ba48f557acc89f0616d330c8ef5caf613aff7;p=thirdparty%2Fgcc.git Mark rtl_avoid_store_forwarding functions final override It is customary to mark the gate and execute functions of the classes representing passes as final override but this is missing in pass_rtl_avoid_store_forwarding. This patch adds it which also silences a clang warning about it. gcc/ChangeLog: 2025-06-24 Martin Jambor * avoid-store-forwarding.cc (class pass_rtl_avoid_store_forwarding): Mark member function gate as final override. --- diff --git a/gcc/avoid-store-forwarding.cc b/gcc/avoid-store-forwarding.cc index 6825d0426ec..37e095316c9 100644 --- a/gcc/avoid-store-forwarding.cc +++ b/gcc/avoid-store-forwarding.cc @@ -80,12 +80,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + virtual bool gate (function *) final override { return flag_avoid_store_forwarding && optimize >= 1; } - virtual unsigned int execute (function *) override; + virtual unsigned int execute (function *) final override; }; // class pass_rtl_avoid_store_forwarding /* Handler for finding and avoiding store forwardings. */