Compiler Warning (level 1) C4333
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (level 1) C4333

Error Message

'operator' : right shift by too large amount, data loss

A right shift operation was too large an amount. All significant bits are shifted out and the result will always be zero.


The following sample generates C4333.

// C4333.cpp
// compile with: /c /W1
unsigned shift8 (unsigned char c) {
   return c >> 8;   // C4333

   // try the following line instead
   // return c >> 4;   // OK
© 2016 Microsoft