mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: default_len is positive
Recent GCC warns that default_len can be negative (thus can overflow PTRDIFF_MAX), which is a false assert. Suppresses warnings by adding __builtin_unreachable. See also: https://travis-ci.org/ruby/ruby/jobs/443568193#L2227 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b30f57c8f
commit
5bb48dc68a
1 changed files with 3 additions and 0 deletions
|
@ -8083,6 +8083,9 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE params, VALUE keywords)
|
|||
keyword->table = ids;
|
||||
return keyword;
|
||||
}
|
||||
else if (default_len < 0) {
|
||||
UNREACHABLE;
|
||||
}
|
||||
|
||||
dvs = ALLOC_N(VALUE, (unsigned int)default_len);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue