Skip to content

Remove mis-uses of UNREACHABLE_RETURN - #22

Merged
byroot merged 2 commits into
mainfrom
unreachable-return
Sep 11, 2026
Merged

byroot merged 2 commits into
mainfrom
unreachable-return

Conversation

@byroot

@byroot byroot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Ref: msgpack/msgpack-ruby#398

UNREACHABLE_RETURN() happen to work on clang and gcc, but fails on some other compilers like msvc.

Either way, it's not really useful because rb_raise is declared as noreturn so I suspect the compiler can already tell this point is unreachable.

FYI: @hsbt

Ref: msgpack/msgpack-ruby#398

`UNREACHABLE_RETURN()` happen to work on clang and gcc, but fails
on some other compilers like msvc.

Either way, it's not really useful because `rb_raise` is declared
as `noreturn` so I suspect the compiler can already tell this
point is unreachable.
@byroot
byroot force-pushed the unreachable-return branch 3 times, most recently from 086c255 to 1016c72 Compare September 11, 2026 08:13
Otherwise there's no version of minitest that support all
the same ruby versions we do.
@byroot
byroot merged commit 9903c0c into main Sep 11, 2026
7 checks passed
@byroot
byroot deleted the unreachable-return branch September 11, 2026 08:20
@hsbt

hsbt commented Sep 11, 2026

Copy link
Copy Markdown

🙏 Thanks! I will try to build this with mswin platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants