public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5962] vec: Silence clang warning
@ 2020-12-13 10:41 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2020-12-13 10:41 UTC (permalink / raw)
  To: gcc-cvs

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

commit r11-5962-gda40a69c9ef8784d37c968ac37daf6f8883d2755
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Sun Dec 13 10:41:06 2020 +0000

    vec: Silence clang warning
    
    I noticed during compatibility testing that clang warns that this
    operator won't be implicitly const in C++14 onwards.
    
    gcc/
            * vec.h (vnull::operator vec<T, A, L>): Make const.

Diff:
---
 gcc/vec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/vec.h b/gcc/vec.h
index 09166f1bce6..31574b49c25 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -550,7 +550,7 @@ vec_copy_construct (T *dst, const T *src, unsigned n)
 struct vnull
 {
   template <typename T, typename A, typename L>
-  CONSTEXPR operator vec<T, A, L> () { return vec<T, A, L>(); }
+  CONSTEXPR operator vec<T, A, L> () const { return vec<T, A, L>(); }
 };
 extern vnull vNULL;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-13 10:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-13 10:41 [gcc r11-5962] vec: Silence clang warning Richard Sandiford

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