From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3BA36385DC34; Fri, 17 Apr 2020 20:43:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3BA36385DC34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587156206; bh=hTcJXRVPjWEUQrzkjipvnMJ/U5buUKbVYNp6azsua5c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wUCdBuUMFtfTU3RhWT0VqHHrYPNHUY4F7RNfa76kljfCAs4HU9ERNii/mfdEAS0pH p02NVY8bEqNRyLh5v1oyaDZorDGwEmQQ/tqsyPdK8y+aic12YG3MWy9sXCfETs1nD7 y983itigD1apJjxTpbw83SITYVeeiPFV6XR72DsQ= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94631] Wrong codegen for arithmetic on bitfields Date: Fri, 17 Apr 2020 20:43:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 20:43:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94631 --- Comment #6 from joseph at codesourcery dot com --- On Fri, 17 Apr 2020, bugdal at aerifal dot cx wrote: > No, GCC's treatment also seems to mess up bitfields smaller than int and = fully > governed by the standard (no implementation-defined use of non-int types): "unsigned int" bit-fields narrower than int are *required* by the=20 standard, for both C and C++, to be promoted to int by the integer=20 promotions.=