error C2719: 'defaultValue': formal parameter with __declspec(align('32')) won't be aligned - by billybaloop

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 767382 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 10/14/2012 5:42:53 PM
Access Restriction Public


I'm trying to use Intel AVX instructions, but as soon as I add a __m256 member to my Vector class,

union Vector
    struct { double x,y,z,w ;} ;
    __m256 reg ; // This breaks many places due to C2719
} ;

I get C2719 all over the project, mostly in places where a Vector is passed to a function:

// This function produces the error
void follow( Vector objectPos, Vector heading, double back, double height )

Also, errors are appearing in the latest (3.1.1) version of the C++ matrix math package Eigen.
Sign in to post a comment.
Posted by Deon [MSFT] on 4/29/2014 at 12:31 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from:
Posted by Charles [MSFT] on 3/26/2013 at 12:09 PM
Thanks for reporting this bug. On x86, you will still get C2719 error because parameters for user-defined types, such as structs are passed by value on stack. On amd64, we will resolve it in the future release.

Charles Fu
Microsoft Visual Studio C++ Team
Posted by Microsoft on 10/15/2012 at 8:24 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by billybaloop on 10/15/2012 at 7:20 AM
Attached a project with example.
Posted by Microsoft on 10/15/2012 at 3:08 AM
Thanks for your feedback.

In order to fix the issue, we must first reproduce the issue in our labs. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project so that we can conduct further research?

Please submit this information to us within 3 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 10/14/2012 at 5:53 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(