1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

17 commits

Author SHA1 Message Date
Nobuyoshi Nakada
f7ffe9dbde
Introduce RBIMPL_NONNULL_ARG macro
Runtime assertion for the argument declared as non-null.
This macro does nothing if `RBIMPL_ATTR_NONNULL` is effective,
otherwise asserts that the argument is non-null.
2021-09-27 14:47:52 +09:00
卜部昌平
0dea31c437 RBIMPL_ATTR_NOALIAS: not until LLVM 12
I observed CI failures.
https://github.com/ruby/ruby/actions/runs/1240165911

It turns out that  RBIMPL_ATTR_NOALIAS was not mature before.  Skip
using it for old clang, and everything work as expected.
2021-09-22 16:37:13 +09:00
卜部昌平
d43accae15 include/ruby/internal/intern/object.h: add doxygen
Must not be a bad idea to improve documents. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
94e5953b48 sed -i 's/. They/. They/'
Truly editorial fix for comments.  This works better with Emacs'
set-justification-full function. [ci skip]
2021-09-10 20:00:06 +09:00
卜部昌平
1cdc75104d RBIMPL_ATTR_DEPRECATED: enable for GCC 10.3+
They fixed the bug.
2021-08-12 11:29:08 +09:00
Yusuke Endoh
457a4913be Disable RBIMPL_ATTR_DEPRECATED for Coverity Scan build
Coverity Scan emulates gcc but seems not to support this attribute
correctly.
2021-06-26 02:30:23 +09:00
Benoit Daloze
68d6bd0873 Fix trivial -Wundef warnings
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
2021-05-04 14:56:55 +02:00
Ryuta Kamizono
33f2ff3bab Fix some typos by spell checker 2021-04-26 10:07:41 +09:00
卜部昌平
6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
卜部昌平
f411fcd145 get rid of #pragma GCC diagnostic ignored "-Wundef"
Use of TOKEN_PASTE was a bad idea at the first place.  Just use ##
everywhere.  Nobody practically lacks token pasting.
2021-04-13 14:30:21 +09:00
Gannon McGibbon
9e0075a3d9 Replace "iff" with "if and only if"
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.
2021-01-19 12:06:45 -08:00
卜部昌平
504e632a15
sync NDEBUG, RUBY_DEBUG, and RUBY_NDEBUG (#3327)
- When NDEBUG is defined that shall be honoured.
- When RUBY_DEBUG is defined that shall be honoured.
- When both are defined and they conflict, warnings shall be rendered.
- When nothing is specified, nothing shall happen.
2020-08-07 14:01:13 +09:00
Koichi Sasada
21991e6ca5 Use RUBY_DEBUG instead of NDEBUG
Assertions in header files slows down an interpreter, so they should be
turned off by default (simple `make`). To enable them, define a macro
`RUBY_DEBUG=1` (e.g. `make cppflags=-DRUBY_DEBUG` or use `#define` at
the very beggining of the file. Note that even if `NDEBUG=1` is defined,
`RUBY_DEBUG=1` enables all assertions.
[Feature #16837]
related: https://github.com/ruby/ruby/pull/3120

`assert()` lines in MRI *.c is not disabled even if `RUBY_DEBUG=0` and
it can be disabled with `NDEBUG=1`. So please consider to use
`RUBY_ASSERT()` if you want to disable them when `RUBY_DEBUG=0`.
2020-05-26 03:21:14 +09:00
卜部昌平
06321ea26c RBIMPL_ATTR_DEPRECATED: disable for GCC10
GCC 10.x seems buggy here.  See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302
2020-05-25 10:17:51 +09:00
卜部昌平
4fbb344156 fix sunpro pragma
SunPro's #pragma does_not_return(...) needs an argument.  That does not
fit the attribute syntax we employ.
2020-05-11 16:47:25 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
b85fd1d690 mv include/ruby/{impl,internal}
Devs do not love "impl".
2020-05-11 09:24:08 +09:00