Title 2087. Left shift of negative value by zero bits
Status open Section 8.8 [expr.shift]
Submitter Mattheus Izvekov

Created on 2015-02-16.00:00:00 by admin, last changed by admin.

msg5908 (view) Date: 2016-02-15.00:00:00

Notes from the February, 2016 meeting:

CWG felt that a reasonable approach might be to define <<N as equivalent to multiplying by 2N in all cases; see also the resolution of issue 1457. The resolution of this question should also be coordinated with SG6 and SG12, as well as with WG14.

msg5507 (view) Date: 2018-02-27.00:00:00

A shift of zero bits should result in the left operand regardless of its sign. However, the current wording of 8.8 [expr.shift] paragraph 2 makes it undefined behavior.

Date User Action Args
2018-02-27 00:00:00adminsetsection: 5.8 [expr.shift] -> 8.8 [expr.shift]
2017-02-06 00:00:00adminsetmessages: + msg5908
2015-02-16 00:00:00admincreate