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

MSVC __STDCPP_DEFAULT_NEW_ALIGNMENT__ not detected #125

Closed
bradking opened this issue Aug 6, 2018 · 0 comments
Closed

MSVC __STDCPP_DEFAULT_NEW_ALIGNMENT__ not detected #125

bradking opened this issue Aug 6, 2018 · 0 comments

Comments

@bradking
Copy link
Member

bradking commented Aug 6, 2018

When using --castxml-cc-msvc with a cl that defines __STDCPP_DEFAULT_NEW_ALIGNMENT__, the definition is not detected and used for preprocessing by castxml. This leads to errors like:

error: use of undeclared identifier '__STDCPP_DEFAULT_NEW_ALIGNMENT__'

during preprocessing of MSVC standard headers.

bradking added a commit to bradking/CastXML that referenced this issue Aug 6, 2018
This macro is missing from the main MSVC predefined macro list but is
documented by [1] and [2].  Also add `__STDCPP_STRICT_POINTER_SAFETY__`
as documented by [2] in case MSVC ever starts defining it.

[1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-alignednew
[2] https://en.cppreference.com/w/cpp/preprocessor/replace

Fixes: CastXML#125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant