This documentation is archived and is not being maintained.

Compiler Warning (level 4) C4820

'bytes' bytes padding added after member 'member'

The type and order of elements caused the compiler to add padding to the end of a struct. See align for more information on padding in a struct.

This warning is off by default. See Compiler Warnings That Are Off by Default for more information.

The following sample generates C4820:

// C4820.cpp
// compile with: /W4
#pragma warning(default : 4820)

struct MyStruct {
   int i;
   char a;
};   // C4820

int main() {