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 Issue 19658 - MSVC++ enum mangling #9605
Conversation
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
|
1e62b79
to
6bb9f3b
Compare
Once again, the hardest part is to make sure the tests work on all platforms. The remaining failures show 2 other issues:
enum __c_longlong : long;
alias cpp_longlong = __c_longlong;
alias int64_t = cpp_longlong;
enum i64_19658 : int64_t { a } =>
|
Restrict the 2 occurrences transparently to POSIX targets only instead of ignoring the flags altogether in d_do_test.d if the CC env variable isn't `c++`. Also prevent a parsed test parameter from featuring leading multiline separators, e.g., in case a a first occurrence did not apply due to OS mismatch, but a second one does (`CXXFLAGS(win32 win64): ...`).
…her enums The magic enums (e.g., core.stdc.stdint.[u]int64_t aliasees on OSX) are not required for the test, as the base type doesn't affect the C++ enum mangling at all.
buf.writeByte('7'); | ||
break; | ||
default: | ||
visit(cast(Type)type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case was deleted, but I don't see a test case for non-integer bases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://en.cppreference.com/w/cpp/language/enum says the enum-base must be an integral type, so that works.
No description provided.