public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Matthias Kretz <mkretz@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r11-10542] libstdc++: Fix -Wsign-compare issue
Date: Thu, 23 Feb 2023 19:46:00 +0000 (GMT)	[thread overview]
Message-ID: <20230223194600.323E63857026@sourceware.org> (raw)

https://gcc.gnu.org/g:073ef7898411b7562cad0b375c57e0357a2ff1ee

commit r11-10542-g073ef7898411b7562cad0b375c57e0357a2ff1ee
Author: Matthias Kretz <m.kretz@gsi.de>
Date:   Tue Feb 21 10:31:55 2023 +0100

    libstdc++: Fix -Wsign-compare issue
    
    Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
    
    libstdc++-v3/ChangeLog:
    
            * include/experimental/bits/simd_builtin.h (_S_set): Compare as
            int. The actual range of these indexes is very small.
    
    (cherry picked from commit ffa39f7120f6e83a567d7a83ff4437f6b41036ea)

Diff:
---
 libstdc++-v3/include/experimental/bits/simd_builtin.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd_builtin.h b/libstdc++-v3/include/experimental/bits/simd_builtin.h
index e986ee91620..3128e5b515e 100644
--- a/libstdc++-v3/include/experimental/bits/simd_builtin.h
+++ b/libstdc++-v3/include/experimental/bits/simd_builtin.h
@@ -2826,7 +2826,7 @@ template <typename _Abi>
 		__k = __generate_from_n_evaluations<_Np,
 						    __vector_type_t<_Tp, _Np>>(
 		  [&](auto __j) {
-		    if (__i == __j)
+		    if (__i == static_cast<int>(__j))
 		      return _Tp(-__x);
 		    else
 		      return __k[+__j];

                 reply	other threads:[~2023-02-23 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230223194600.323E63857026@sourceware.org \
    --to=mkretz@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).