public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH (pushed)] fix -Winconsistent-missing-override clang warning
@ 2022-08-31 12:18 Martin Liška
  2022-08-31 12:18 ` Martin Liška
  2022-08-31 12:20 ` Aldy Hernandez
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Liška @ 2022-08-31 12:18 UTC (permalink / raw)
  To: gcc-patches; +Cc: Aldy Hernandez, Andrew MacLeod

Fixes:
gcc/value-range.h:357:16: warning: 'set_nonnegative' overrides
a member function but is not marked 'override' [-Winconsistent-missing-override]

gcc/ChangeLog:

	* value-range.h: Add override.
---
 gcc/value-range.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/value-range.h b/gcc/value-range.h
index 07379d58f88..b25dd30d88a 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -354,7 +354,7 @@ public:
   virtual bool nonzero_p () const;
   virtual void set_nonzero (tree type);
   virtual void set_zero (tree type);
-  virtual void set_nonnegative (tree type);
+  virtual void set_nonnegative (tree type) override;
   frange& operator= (const frange &);
   bool operator== (const frange &) const;
   bool operator!= (const frange &r) const { return !(*this == r); }
-- 
2.37.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH (pushed)] fix -Winconsistent-missing-override clang warning
  2022-08-31 12:18 [PATCH (pushed)] fix -Winconsistent-missing-override clang warning Martin Liška
@ 2022-08-31 12:18 ` Martin Liška
  2022-08-31 12:20 ` Aldy Hernandez
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Liška @ 2022-08-31 12:18 UTC (permalink / raw)
  To: gcc-patches

Fixes:
gcc/value-range.h:357:16: warning: 'set_nonnegative' overrides
a member function but is not marked 'override' [-Winconsistent-missing-override]

gcc/ChangeLog:

	* value-range.h: Add override.
---
 gcc/value-range.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/value-range.h b/gcc/value-range.h
index 07379d58f88..b25dd30d88a 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -354,7 +354,7 @@ public:
   virtual bool nonzero_p () const;
   virtual void set_nonzero (tree type);
   virtual void set_zero (tree type);
-  virtual void set_nonnegative (tree type);
+  virtual void set_nonnegative (tree type) override;
   frange& operator= (const frange &);
   bool operator== (const frange &) const;
   bool operator!= (const frange &r) const { return !(*this == r); }
-- 
2.37.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH (pushed)] fix -Winconsistent-missing-override clang warning
  2022-08-31 12:18 [PATCH (pushed)] fix -Winconsistent-missing-override clang warning Martin Liška
  2022-08-31 12:18 ` Martin Liška
@ 2022-08-31 12:20 ` Aldy Hernandez
  1 sibling, 0 replies; 3+ messages in thread
From: Aldy Hernandez @ 2022-08-31 12:20 UTC (permalink / raw)
  To: Martin Liška; +Cc: gcc-patches, Andrew MacLeod

Thanks.

On Wed, Aug 31, 2022 at 2:18 PM Martin Liška <mliska@suse.cz> wrote:
>
> Fixes:
> gcc/value-range.h:357:16: warning: 'set_nonnegative' overrides
> a member function but is not marked 'override' [-Winconsistent-missing-override]
>
> gcc/ChangeLog:
>
>         * value-range.h: Add override.
> ---
>  gcc/value-range.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/value-range.h b/gcc/value-range.h
> index 07379d58f88..b25dd30d88a 100644
> --- a/gcc/value-range.h
> +++ b/gcc/value-range.h
> @@ -354,7 +354,7 @@ public:
>    virtual bool nonzero_p () const;
>    virtual void set_nonzero (tree type);
>    virtual void set_zero (tree type);
> -  virtual void set_nonnegative (tree type);
> +  virtual void set_nonnegative (tree type) override;
>    frange& operator= (const frange &);
>    bool operator== (const frange &) const;
>    bool operator!= (const frange &r) const { return !(*this == r); }
> --
> 2.37.2
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-31 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 12:18 [PATCH (pushed)] fix -Winconsistent-missing-override clang warning Martin Liška
2022-08-31 12:18 ` Martin Liška
2022-08-31 12:20 ` Aldy Hernandez

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).