HomeFreeBSD

libc/stdc_has_single_bit.c: fix gcc warning (-Wparentheses)

Description

libc/stdc_has_single_bit.c: fix gcc warning (-Wparentheses)

gcc14 is concerned that the operator precedence between - and & might
be confusing. Throw in some redundant parentheses to make it shut up.
The LLVM build was fine before this change.

Reported by: Martin Filla <freebsd@sysctl.cz>
Approved by: markj (mentor)
MFC after: 1 month
Fixes: 6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64
Differential Revision: https://reviews.freebsd.org/D54057

(cherry picked from commit 3d71ce92eae9f1417f35a0d07912858fd8f6fa0b)

Details

Provenance
fuzAuthored on Dec 3 2025, 6:36 PM
Differential Revision
D54057: libc/stdc_has_single_bit.c: fix gcc warning (-Wparentheses)
Parents
rG275c11b7ccff: libc: implement C23 <stdbit.h> functions
Branches
Unknown
Tags
Unknown