<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/internal/special_consts.h, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix false warning by gcc 14 for aarch64</title>
<updated>2024-10-23T14:02:15+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-10-22T06:08:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7d1011d3fa7226c47adf2914fb9035304f233cb2'/>
<id>7d1011d3fa7226c47adf2914fb9035304f233cb2</id>
<content type='text'>
gcc 14 for aarch64 with `-O3` may emit a false positive warning for a
pointer access of `RB_BUILTIN_TYPE` called from `RB_TYPE_P`.  `Qfalse`
shouldn't get there because of `RB_SPECIAL_CONST_P`, but the optimizer
seems to ignore this condition in some cases (`ASSUME` just before the
access doesn't seem to have any effect either).  Only by reversing the
order in `RB_SPECIAL_CONST_P` to compare with 0 first does the warning
seem to go away.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc 14 for aarch64 with `-O3` may emit a false positive warning for a
pointer access of `RB_BUILTIN_TYPE` called from `RB_TYPE_P`.  `Qfalse`
shouldn't get there because of `RB_SPECIAL_CONST_P`, but the optimizer
seems to ignore this condition in some cases (`ASSUME` just before the
access doesn't seem to have any effect either).  Only by reversing the
order in `RB_SPECIAL_CONST_P` to compare with 0 first does the warning
seem to go away.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix sign-conversion warning</title>
<updated>2024-08-11T07:04:37+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-08-11T07:04:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1fd0a1b4ceef29a5aade5e1d896dca5b74258e6f'/>
<id>1fd0a1b4ceef29a5aade5e1d896dca5b74258e6f</id>
<content type='text'>
```
../../.././include/ruby/internal/special_consts.h:349:36: error: conversion to ‘VALUE’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
  349 |     return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
../../.././include/ruby/internal/special_consts.h:349:36: error: conversion to ‘VALUE’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
  349 |     return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow compilation of C extensions with `-Wconversion`</title>
<updated>2024-05-28T05:33:07+00:00</updated>
<author>
<name>Mike Dalessio</name>
<email>mike.dalessio@gmail.com</email>
</author>
<published>2024-05-24T17:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1b8ba1551b26fac906998e34fd2af3f82b433469'/>
<id>1b8ba1551b26fac906998e34fd2af3f82b433469</id>
<content type='text'>
C extension maintainers can now compile with this warning option and
the Ruby header files will generate no warnings.

[Feature #20507]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
C extension maintainers can now compile with this warning option and
the Ruby header files will generate no warnings.

[Feature #20507]
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor RB_SPECIAL_CONST_P (#6759)</title>
<updated>2022-11-18T01:55:24+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-18T01:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ab4379e086d69b13f4446bb0bddd87844650ea1a'/>
<id>ab4379e086d69b13f4446bb0bddd87844650ea1a</id>
<content type='text'>
Since https://github.com/ruby/ruby/pull/6599, RUBY_IMMEDIATE_MASK also
overlaps RUBY_Qnil. Now RB_SPECIAL_CONST_P seems confusing since both
RB_IMMEDIATE_P and RB_TEST check for RUBY_Qnil while we only need to
check RUBY_Qnil besides RUBY_IMMEDIATE_MASK. I'd like to make this
change to make it less confusing.

I confirmed that this doesn't change the number of instructions used for
the RUBY_Qfalse check on Linux x86_64 GCC and macOS arm64 Clang.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since https://github.com/ruby/ruby/pull/6599, RUBY_IMMEDIATE_MASK also
overlaps RUBY_Qnil. Now RB_SPECIAL_CONST_P seems confusing since both
RB_IMMEDIATE_P and RB_TEST check for RUBY_Qnil while we only need to
check RUBY_Qnil besides RUBY_IMMEDIATE_MASK. I'd like to make this
change to make it less confusing.

I confirmed that this doesn't change the number of instructions used for
the RUBY_Qfalse check on Linux x86_64 GCC and macOS arm64 Clang.</pre>
</div>
</content>
</entry>
<entry>
<title>Use CXX14 to allow constexpr with non-return statements</title>
<updated>2022-10-24T23:47:42+00:00</updated>
<author>
<name>Nick Hengeveld</name>
<email>nickh@github.com</email>
</author>
<published>2022-10-24T22:28:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee3da3784e13c9f5164206a373d14d3f7aa9d245'/>
<id>ee3da3784e13c9f5164206a373d14d3f7aa9d245</id>
<content type='text'>
Co-authored-by: Daniel Colson &lt;composerinteralia@github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Daniel Colson &lt;composerinteralia@github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Define `UNDEF_P` and `NIL_OR_UNDEF_P` [EXPERIMENTAL]</title>
<updated>2022-10-20T13:05:27+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-20T05:42:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=192bc725290ca4b271bff2bae6123d84c25f7173'/>
<id>192bc725290ca4b271bff2bae6123d84c25f7173</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move "special consts" so `Qundef` and `Qnil` differ just 1 bit</title>
<updated>2022-10-20T13:05:27+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-20T01:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f55212bce939f736559709a8cd16c409772389c8'/>
<id>f55212bce939f736559709a8cd16c409772389c8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix RUBY_SYMBOL_FLAG comment [ci skip]</title>
<updated>2022-10-20T02:49:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-20T02:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0a43a040b4f2f08682d11e20d901ba6d8cc26cfe'/>
<id>0a43a040b4f2f08682d11e20d901ba6d8cc26cfe</id>
<content type='text'>
Upper bits than the least significant 4 bits need not be 0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upper bits than the least significant 4 bits need not be 0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Assert for RTEST that Qnil and Qfalse differ just 1 bit</title>
<updated>2022-10-19T13:55:42+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-19T09:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=412e3c7a8db275567eaceece6c48dde3aedf2ae6'/>
<id>412e3c7a8db275567eaceece6c48dde3aedf2ae6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>include/ruby/internal/special_consts.h: add doxygen</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2021-01-15T07:34:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b0a7c0dfd04ac51b621c016387d5f65cfe3ecf5a'/>
<id>b0a7c0dfd04ac51b621c016387d5f65cfe3ecf5a</id>
<content type='text'>
Must not be a bad idea to improve documents. [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Must not be a bad idea to improve documents. [ci skip]
</pre>
</div>
</content>
</entry>
</feed>
