Title
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, last changed 2017-02-06.00:00:00.

Messages

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.

Date: 2015-02-16.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.

History
Date User Action Args
2017-02-06 00:00:00adminsetmessages: + msg5781
2015-02-16 00:00:00admincreate