This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118g. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-19


2724. Clarify rounding for arithmetic right shift

Section: 7.6.7  [expr.shift]     Status: CD7     Submitter: Jan Schultke     Date: 2023-04-07

[Accepted as a DR at the June, 2023 meeting.]

(From editorial issue 6225.)

Subclause 7.6.7 [expr.shift] paragraph 3 specifies:

The value of E1 >> E2 is E1/2E2, rounded down.

It is unclear whether "rounded down" means "towards zero" or "towards negative infinity".

Proposed resolution (approved by CWG 2023-05-12):

Change in 7.6.7 [expr.shift] paragraph 3 as follows:

The value of E1 >> E2 is E1/2E2, rounded down towards negative infinity.


Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant