Skip to content

Make c99, c23 compatible - #1870

Merged
soutaro merged 2 commits into
masterfrom
c99
Jun 7, 2024
Merged

soutaro merged 2 commits into
masterfrom
c99

Conversation

@soutaro

@soutaro soutaro commented Jun 6, 2024

Copy link
Copy Markdown
Member

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];


#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
Copy Markdown
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
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants