[pushed] VR: add missing override keyworks

Message ID 97b4d7cd-2cf3-13a0-9c77-c9d1176f6a4f@suse.cz
State New, archived
Headers
Series [pushed] VR: add missing override keyworks |

Commit Message

Martin Liška Aug. 16, 2022, 9:07 a.m. UTC
  Pushing as it follows the same pattern as:

  virtual void set (tree, tree, value_range_kind = VR_RANGE) override;

Martin

Address:

gcc/value-range-equiv.h:57:8: warning: 'set_undefined' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/value-range-equiv.h:58:8: warning: 'set_varying' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

gcc/ChangeLog:

	* value-range-equiv.h (class value_range_equiv):
---
 gcc/value-range-equiv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Aldy Hernandez Aug. 16, 2022, 9:08 a.m. UTC | #1
Thanks.

On Tue, Aug 16, 2022 at 11:07 AM Martin Liška <mliska@suse.cz> wrote:
>
> Pushing as it follows the same pattern as:
>
>   virtual void set (tree, tree, value_range_kind = VR_RANGE) override;
>
> Martin
>
> Address:
>
> gcc/value-range-equiv.h:57:8: warning: 'set_undefined' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
> gcc/value-range-equiv.h:58:8: warning: 'set_varying' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
>
> gcc/ChangeLog:
>
>         * value-range-equiv.h (class value_range_equiv):
> ---
>  gcc/value-range-equiv.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/value-range-equiv.h b/gcc/value-range-equiv.h
> index 0a52d1372a1..ad8c640b15b 100644
> --- a/gcc/value-range-equiv.h
> +++ b/gcc/value-range-equiv.h
> @@ -54,8 +54,8 @@ class GTY((user)) value_range_equiv : public value_range
>    bool equal_p (const value_range_equiv &, bool ignore_equivs) const;
>
>    /* Types of value ranges.  */
> -  void set_undefined ();
> -  void set_varying (tree);
> +  void set_undefined () override;
> +  void set_varying (tree) override;
>
>    /* Equivalence bitmap methods.  */
>    bitmap equiv () const { return m_equiv; }
> --
> 2.37.1
>
  

Patch

diff --git a/gcc/value-range-equiv.h b/gcc/value-range-equiv.h
index 0a52d1372a1..ad8c640b15b 100644
--- a/gcc/value-range-equiv.h
+++ b/gcc/value-range-equiv.h
@@ -54,8 +54,8 @@  class GTY((user)) value_range_equiv : public value_range
   bool equal_p (const value_range_equiv &, bool ignore_equivs) const;
 
   /* Types of value ranges.  */
-  void set_undefined ();
-  void set_varying (tree);
+  void set_undefined () override;
+  void set_varying (tree) override;
 
   /* Equivalence bitmap methods.  */
   bitmap equiv () const { return m_equiv; }