[gcc r13-2306] fix -Winconsistent-missing-override clang warning

Martin Liska marxin@gcc.gnu.org
Wed Aug 31 12:18:25 GMT 2022


https://gcc.gnu.org/g:cc95bca72f6e7f54c4adb6d332f881c277746366

commit r13-2306-gcc95bca72f6e7f54c4adb6d332f881c277746366
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Aug 31 14:12:48 2022 +0200

    fix -Winconsistent-missing-override clang warning
    
    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.

Diff:
---
 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); }


More information about the Gcc-cvs mailing list