When compiling my app today, I encountered this warning (the code, I think, is irrelevant):
warning C4315: 'MyClass' : 'this' pointer for member 'MyClass::my_data_' may not be aligned 8 as expected by the constructor
I am not able to find any documentation about this warning, in either the online help, my locally-installed help, or via a google search. I did find one link on a MS forum:
No documentation for compiler warning C4315
But no information about the error itself.
Do you have any information about this error? I'm trying to fogure out how to fix it.
I'd look for something (buried in a header?) changing the structure packing from the default.
The warning seems to be saying that whatever type MyClass::my_data_
is expects to be 8-byte aligned, but it's not being placed at that alignment inside MyClass
.
Search for #pragma pack(some-number)
directives that aren't reset with a #pragma pack()
.
Using #pragma pack(show)
would probably be helpful, too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With