get rid of #pragma GCC diagnostic ignored "-Wundef"#4371
Merged
shyouhei merged 3 commits intoruby:masterfrom Apr 13, 2021
Merged
get rid of #pragma GCC diagnostic ignored "-Wundef"#4371shyouhei merged 3 commits intoruby:masterfrom
shyouhei merged 3 commits intoruby:masterfrom
Conversation
Use of TOKEN_PASTE was a bad idea at the first place. Just use ## everywhere. Nobody practically lacks token pasting.
Member
Author
|
Let me see if this breaks portability... |
eregon
reviewed
Apr 9, 2021
Previous code failed to compile on MSVC. Log: https://github.com/ruby/ruby/pull/4371/checks?check_run_id=2304484466 This is possibly due to the fact that: 1. `Data_Wrap_Struct(...)` appears in a source code 2. which expands to `rb_data_object_wrap(...)` 3. which expands to `RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)` 4. which expands to `rb_data_object_wrap_0` 5. which expands to `rb_data_object_wrap`, so far so good, but 6. this is a recursive macro expansion (see step 2). Everybody stops expanding... - in step 4 for MSVC, and - in step 5 for GCC etc. I have no idea why but this proposed changeset prevents MSVC from stopping at step 4.
eregon
approved these changes
Apr 12, 2021
Member
eregon
left a comment
There was a problem hiding this comment.
Thanks for the investigation and fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.ruby-lang.org/issues/17752
Use of
TOKEN_PASTEwas a bad idea at the first place. Just use##everywhere. Nobody practically lacks token pasting.