Compiler Warning (level 4) C4324

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Warning (level 4) C4324.

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: