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

Check correct C++ runtime library version during compilation #529

Closed
mikir opened this issue Sep 4, 2023 · 0 comments
Closed

Check correct C++ runtime library version during compilation #529

mikir opened this issue Sep 4, 2023 · 0 comments
Assignees
Labels
c++ C++ language generator enhancement New feature or request
Milestone

Comments

@mikir
Copy link
Contributor

mikir commented Sep 4, 2023

It would be possible to check correct C++ runtime library version during compilation using C++ preprocessor. For example, runtime library version is defined in zserio/CppRuntimeVersion.h header. This runtime library version could be checked using C++ preprocessor in each generated header:

#include <zserio/CppRuntimeVersion.h>
#if CPP_EXTENSION_RUNTIME_VERSION != 2011000
    #error Version mismatch between zserio compiler and zserio runtime library!
    #error Please update your runtime library to have the same version as zserio compiler.
#endif

Such solution will avoid unintentionally usage of incompatible zserio runtime library in C++.

@mikir mikir added enhancement New feature or request c++ C++ language generator labels Sep 4, 2023
@mikir mikir added this to the 2.12 milestone Sep 4, 2023
@mikir mikir changed the title Check correct runtime library version in C++ during compilation Check correct C++ runtime library version during compilation Sep 4, 2023
@mikir mikir self-assigned this Sep 4, 2023
@mikir mikir closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ C++ language generator enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant