From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E44043851C1E; Tue, 16 May 2023 12:50:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E44043851C1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684241417; bh=qlWVO3YR8Pjcbg2Xgt1FQw2deSZi2cgazxaPgbAqKPM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w8kP8z4h9ztZPYJ/nTlbRhChz1rwHg78ZAsD/O24jvqnWFynKYqfjya1MKaK/4EBO NUq4Gm4OiFROxPJTM41LWx9TnhtqYPtvfjRD+g2ufBa9EauKYQogzoY7SpfPFtUy8a ZJ8PpmU/HyD8Wuqvi+bv7yg8w95xM2SiKfxgkDAU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/104875] libstdc++-v3/src/c++11/codecvt.cc:312:24: warning: left shift count >= width of type Date: Tue, 16 May 2023 12:50:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104875 --- Comment #5 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:e4b0d0b84b719ea9cd3d0a7b0668cdd8055a07d2 commit r11-10770-ge4b0d0b84b719ea9cd3d0a7b0668cdd8055a07d2 Author: Jonathan Wakely Date: Fri Mar 11 14:52:38 2022 +0000 libstdc++: Fix reading UTF-8 characters for 16-bit targets [PR104875] The current code in read_utf8_code_point assumes that integer promotion will create a 32-bit int, but that's not true for 16-bit targets like msp430 and avr. This changes the intermediate variables used for each octet from unsigned char to char32_t, so that (c << N) works correctly when N > 8. libstdc++-v3/ChangeLog: PR libstdc++/104875 * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to hold octets that will be left-shifted. (cherry picked from commit 8f7b7c1495f92c72da154d32317943a2cc276ca8)=