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

fix CEREAL_*_DYNAMIC_INIT #430

Merged
merged 1 commit into from
Sep 6, 2017
Merged

Conversation

WSoptics
Copy link
Contributor

@WSoptics WSoptics commented Sep 1, 2017

The CEREAL_FORCE_DYNAMIC_INIT macro does not work in our code base with higher optimization. It does work in the debug build. The compiler also warns about unused functions.

It seems they are just optimized away. I'm not sure whether that's legal by the compiler.

I changed the macro to use a static object local to the translation unit that calls the function in its constructor. This works for us now.

@AzothAmmo AzothAmmo added the bug label Sep 6, 2017
@AzothAmmo AzothAmmo added this to the v1.2.3 milestone Sep 6, 2017
@AzothAmmo AzothAmmo merged commit 7292a60 into USCiLab:develop Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants