Previous Table of Contents "New C Standard" commentary
shift-expression: additive-expression shift-expression << additive-expression shift-expression >> additive-expression
1182 Each of the operands shall have integer type.
1183 The integer promotions are performed on each of the operands.
1184 The type of the result is that of the promoted left operand.
1185 If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined.
1186 89) Another way to approach pointer arithmetic is first to convert the pointer(s) to character pointer(s): In this scheme the integer expression added to or subtracted from the converted pointer is first multiplied by the size of the object originally pointed to, and the resulting pointer is converted back to the original type.
1187 For pointer subtraction, the result of the difference between the character pointers is similarly divided by the size of the object originally pointed to.
1188 When viewed in this way, an implementation need only provide one extra byte (which may overlap another object in the program) just after the end of the object in order to satisfy the one past the last element requirements.
The result of
1190 vacated bits are filled with zeros.
1193 otherwise, the behavior is undefined.
The result of
Created at: 2008-01-30 02:39:43
The text from WG14/N1256 is copyright © ISO
Created at: 2008-01-30 02:39:43 The text from WG14/N1256 is copyright © ISO