Compiler Warning (level 4) C4324

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Warning (level 4) C4324 on docs.microsoft.com. 'struct_name' : structure was padded due to __declspec(align())

Padding was added at the end of a structure because you specified a __declspec(align) value.

For example, the following code generates C4324:

// C4324.cpp  
// compile with: /W4  
struct __declspec(align(32)) A  
{  
   char a;  
};   // C4324  
  
int main()  
{  
}  

Show: