Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define alignment structs and arrays for fmi #34

Closed
modelica-trac-importer opened this issue Oct 16, 2018 · 2 comments
Closed

define alignment structs and arrays for fmi #34

modelica-trac-importer opened this issue Oct 16, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@modelica-trac-importer
Copy link

Reported by andreas.junghanns on 8 Jan 2010 22:15 UTC
We have not specified the alignment for structs and arrays in the fmi yet. This could allow compilers or users to define the alignment - that could lead to incompatible binaries.

Thus, I suggest to (re-)define the alignment policy:

#ifdef WIN32
#pragma pack(push,8)
#endif

struct A {
...
};

#ifdef WIN32
#pragma pack(pop)
#endif

I tested this and it works for Visual Studio and gcc.
Test attached.


Migrated-From: https://trac.fmi-standard.org/ticket/34

@modelica-trac-importer
Copy link
Author

Modified by andreas on 19 Jan 2010 20:14 UTC

@modelica-trac-importer
Copy link
Author

Modified by dietmarw on 7 Sep 2012 10:18 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant