This documentation is archived and is not being maintained.

Compiler Error C2718

'parameter': actual parameter with __declspec(align('#')) won't be aligned

The align __declspec modifier is not permitted on function parameters.

The following sample generates C2718:

// C2718.cpp
typedef struct __declspec(align(16)) AlignedStruct 
   int i; 
} AlignedStruct;

void f2(int i, ...);

void f4()
   AlignedStruct as;

   f2(0, as);   // C2718, actual parameter is aligned

int main()