[#104169] [Ruby master Feature#17938] Keyword alternative for boolean positional arguments — matheusrichardt@...

Issue #17938 has been reported by matheusrich (Matheus Richard).

12 messages 2021/06/04

[#104213] [Ruby master Feature#17942] Add a `initialize(public @a, private @b)` shortcut syntax for defining public/private accessors for instance vars — tyler@...

Issue #17942 has been reported by TylerRick (Tyler Rick).

6 messages 2021/06/09

[#104288] [Ruby master Bug#17992] Upstreaming the htmlentities gem into CGI#.(un)escape_html — alexandermomchilov@...

Issue #17992 has been reported by AMomchilov (Alexander Momchilov).

9 messages 2021/06/15

[#104338] [Ruby master Misc#17997] DevelopersMeeting20210715Japan — mame@...

Issue #17997 has been reported by mame (Yusuke Endoh).

10 messages 2021/06/17

[#104361] [Ruby master Bug#18000] have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library — jean.boussier@...

Issue #18000 has been reported by byroot (Jean Boussier).

9 messages 2021/06/18

[#104401] [Ruby master Feature#18007] Help developers of C extensions meet requirements in "doc/extension.rdoc" — mike.dalessio@...

Issue #18007 has been reported by mdalessio (Mike Dalessio).

16 messages 2021/06/25

[#104430] [Ruby master Bug#18011] `Method#parameters` is incorrect for forwarded arguments — josh.cheek@...

Issue #18011 has been reported by josh.cheek (Josh Cheek).

12 messages 2021/06/29

[ruby-core:104287] [Ruby master Bug#17946] win32/win32.c: `&` has lower precedence than `==`

From: merch-redmine@...
Date: 2021-06-15 19:36:13 UTC
List: ruby-core #104287
Issue #17946 has been updated by jeremyevans0 (Jeremy Evans).


Thank you for pointing this out.  I agree that parentheses must have been intended in this case.  I submitted a pull request to add them: https://github.com/ruby/ruby/pull/4575 

----------------------------------------
Bug #17946: win32/win32.c: `&` has lower precedence than `==`
https://bugs.ruby-lang.org/issues/17946#change-92505

* Author: xtkoba (Tee KOBAYASHI)
* Status: Open
* Priority: Normal
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
A warning in [win32/win32.c:2600](https://github.com/ruby/ruby/blob/9210f8df7ff23f06c03dedf9f89fd8ab902043e3/win32/win32.c#L2600):

```
../win32/win32.c:2606:88: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
                *(pend + (sizeof(FUNCTION_BEFORE_RET_MARK) - 1) + FUNCTION_SKIP_BYTES) & FUNCTION_RET == FUNCTION_RET) {
                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../win32/win32.c:2606:88: note: place parentheses around the '==' expression to silence this warning
                *(pend + (sizeof(FUNCTION_BEFORE_RET_MARK) - 1) + FUNCTION_SKIP_BYTES) & FUNCTION_RET == FUNCTION_RET) {
                                                                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../win32/win32.c:2606:88: note: place parentheses around the & expression to evaluate it first
                *(pend + (sizeof(FUNCTION_BEFORE_RET_MARK) - 1) + FUNCTION_SKIP_BYTES) & FUNCTION_RET == FUNCTION_RET) {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
```

I believe this is not intentional because `FUNCTION_RET == FUNCTION_RET` is a tautology.



-- 
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>

In This Thread

Prev Next