I have this code in two VS2010 projects:
__declspec(align(16)) struct S { int a; }; void f(S v) {}
It should not compile, because you cannot pass agreed arguments to functions (unless you pass them by reference); and one project rejects it, as I expected. But another project compiles it OK, and then it crashes at runtime.
My question is: why is it ever allowed to compile?
I looked through all the compiler options, and I cannot find anything relevant.
source share