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

Make c99, c23 compatible #1870

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Make c99, c23 compatible #1870

merged 2 commits into from
Jun 7, 2024

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Jun 6, 2024

CI on ruby/ruby didn't compile.

../../../../../../src/.bundle/gems/rbs-3.5.0/ext/rbs_extension/location.h:23:25: error: zero size arrays are an extension [-Werror,-Wzero-length-array]
   23 |   rbs_loc_entry entries[0];

@@ -2,6 +2,7 @@

#define RBS_LOC_REQUIRED_P(loc, i) ((loc)->children->required_p & (1 << (i)))
#define RBS_LOC_OPTIONAL_P(loc, i) (!RBS_LOC_REQUIRED_P((loc), (i)))
#define RBS_LOC_CHILDREN_SIZE(cap) (sizeof(rbs_loc_children) + sizeof(rbs_loc_entry) * ((cap) - 1))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sizeof(rbs_loc_children) contains sizeof(rbs_loc_entry) * 1 already.

@soutaro soutaro mentioned this pull request Jun 7, 2024
@soutaro soutaro added this pull request to the merge queue Jun 7, 2024
Merged via the queue into master with commit 1b563e8 Jun 7, 2024
18 of 19 checks passed
@soutaro soutaro deleted the c99 branch June 7, 2024 03:02
@soutaro soutaro added this to the RBS 3.5.x milestone Jun 7, 2024
@soutaro soutaro added the Released PRs already included in the released version label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

2 participants