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 value_type.h compatible with -Wconversion #10854

Merged
merged 1 commit into from
May 28, 2024

Conversation

casperisfine
Copy link
Contributor

Followup: #10843

[Feature #20507]

This was missed from the initial commit.

../../.././include/ruby/internal/value_type.h:446:27: error: implicit conversion changes signedness: 'enum ruby_value_type' to 'int' [-Werror,-Wsign-conversion]
    rb_unexpected_type(v, t);
    ~~~~~~~~~~~~~~~~~~    ^

@flavorjones @nobu @shyouhei

[Feature #20507]

This was missed from the initial commit.

```
../../.././include/ruby/internal/value_type.h:446:27: error: implicit conversion changes signedness: 'enum ruby_value_type' to 'int' [-Werror,-Wsign-conversion]
    rb_unexpected_type(v, t);
    ~~~~~~~~~~~~~~~~~~    ^
```
Copy link
Member

@shyouhei shyouhei left a comment

Choose a reason for hiding this comment

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

OK. TBH an enum needs explicit cast to int sounds esoteric to me though.

@byroot byroot merged commit ceeb995 into ruby:master May 28, 2024
101 checks passed
@flavorjones
Copy link
Contributor

@byroot Thanks. I'm sure there are probably more instances. I only addressed the ones that a) show up in MakeMakefile.try_compile or b) in the C extensions I maintain.

@byroot
Copy link
Member

byroot commented May 28, 2024

I found this one because it was failing the regression test when running make on my machine. Not too sure why CI didn't catch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants