[#88925] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
4 messages
2018/09/09
[#88927] Re: [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical
— Eric Wong <normalperson@...>
2018/09/09
ko1@atdot.net wrote:
[#88926] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
3 messages
2018/09/09
[#89218] [Ruby trunk Bug#15130] open-uri hangs on cygwin — duerst@...
Issue #15130 has been updated by duerst (Martin D端rst).
5 messages
2018/09/30
[ruby-core:89077] [Ruby trunk Misc#15136] Fix -Wparentheses warnings
From:
duerst@...
Date:
2018-09-19 04:42:48 UTC
List:
ruby-core #89077
Issue #15136 has been updated by duerst (Martin D端rst).
jaruga (Jun Aruga) wrote:
> Before the modification, there were 18 warnings for `-Wparentheses`.
My crude guess is that all of them would be for cases such as "assignment in a context where a truth value is expected" (first paragraph of man gcc). All the other cases will have problems on other compilers anyway.
You say "I fixed the warnings". So why is this issue still open.
----------------------------------------
Misc #15136: Fix -Wparentheses warnings
https://bugs.ruby-lang.org/issues/15136#change-74096
* Author: jaruga (Jun Aruga)
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
Currently the `-Wno-parentheses` was set.
I assumed if we could fix the warning, we could remove the `-Wno-parentheses`.
I fixed the warnings, because the warning is used as a default on Fedora Project build environment.
I sent pull-request. https://github.com/ruby/ruby/pull/1958
I would show you the explanation of `-Wparentheses`.
```
$ man gcc (or gcc --help --verbose)
...
-Wparentheses
Warn if parentheses are omitted in certain contexts, such as when there is an
assignment in a context where a truth value is expected, or when operators are
nested whose precedence people often get confused about.
Also warn if a comparison like "x<=y<=z" appears; this is equivalent to "(x<=y ?
1 : 0) <= z", which is a different interpretation from that of ordinary
mathematical notation.
Also warn for dangerous uses of the GNU extension to "?:" with omitted middle
operand. When the condition in the "?": operator is a boolean expression, the
omitted value is always 1. Often programmers expect it to be a value computed
inside the conditional expression instead.
For C++ this also warns for some cases of unnecessary parentheses in
declarations, which can indicate an attempt at a function call instead of a
declaration:
{
// Declares a local variable called mymutex.
std::unique_lock<std::mutex> (mymutex);
// User meant std::unique_lock<std::mutex> lock (mymutex);
}
This warning is enabled by -Wall.
...
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>