From: xtkoba+ruby@... Date: 2021-06-11T00:26:27+00:00 Subject: [ruby-core:104232] [Ruby master Bug#17946] win32/win32.c: `&` has lower precedence than `==` Issue #17946 has been reported by xtkoba (Tee KOBAYASHI). ---------------------------------------- Bug #17946: win32/win32.c: `&` has lower precedence than `==` https://bugs.ruby-lang.org/issues/17946 * 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: