-
Notifications
You must be signed in to change notification settings - Fork 226
Fix error at Ruby CI #2445
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 error at Ruby CI #2445
Changes from all commits
4c22784
c5a3a8a
9de9a01
0e8c41d
eb440db
ccdef8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #ifdef __clang__ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Including |
||
| #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN \ | ||
| _Pragma("clang diagnostic push") \ | ||
| _Pragma("clang diagnostic ignored \"-Wc2x-extensions\"") | ||
| #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END \ | ||
| _Pragma("clang diagnostic pop") | ||
| #else | ||
| #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_BEGIN | ||
| #define SUPPRESS_RUBY_HEADER_DIAGNOSTICS_END | ||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,5 +13,9 @@ | |
|
|
||
| append_cflags ['-std=gnu99', '-Wimplicit-fallthrough', '-Wunused-result'] | ||
| append_cflags ['-O0', '-g'] if ENV['DEBUG'] | ||
| if ENV["TEST_NO_C23"] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
| puts "Adding -Wc2x-extensions to CFLAGS" | ||
| $CFLAGS << " -Werror -Wc2x-extensions" | ||
| end | ||
|
|
||
| create_makefile 'rbs_extension' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,4 +183,6 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan | |
| return ID2SYM(rb_intern3((const char *) constant->start, constant->length, ctx.encoding)); | ||
| } | ||
| } | ||
|
|
||
| rb_raise(rb_eRuntimeError, "Unknown node type: %d", instance->type); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GCC reports |
||
| } | ||
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 job compiles the extension without C23 extensions to ensure it compiles with C99 compilers.
To compile it with
clang, notgcc, the macos platform is used.