Date: Wed, 21 Dec 2022 02:04:22 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268497] clang15 math.h isfinite() generates unreachable-code-generic-assoc warnings Message-ID: <bug-268497-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268497 Bug ID: 268497 Summary: clang15 math.h isfinite() generates unreachable-code-generic-assoc warnings Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: nicholas.h.briggs@gmail.com This appears to be a variant of #254714 coming back to life with clang15 -- Compiling int foo(void) { return isfinite(1.0f); } with clang15 -c isfinitetest.c -o isfinitetest.o generates % clang15 -c isfinitetest.c -o isfinitetest.o=20 isfinitetest.c:2:24: warning: due to lvalue conversion of the controlling expression, association of type 'volatile float' will never be selected bec= ause it is qualified [-Wunreachable-code-generic-assoc] int foo(void) { return isfinite(1.0f); } ^ /usr/include/math.h:110:21: note: expanded from macro 'isfinite' #define isfinite(x) __fp_type_select(x, __isfinitef, __isfinite, __isfinite= l) ^ /usr/include/math.h:85:14: note: expanded from macro '__fp_type_select' volatile float: f(x), \ ^ (and so on for 8 more errors with all combinations of (volatile, const) x (float, double)) This was not an issue with clang 13, but clang 15 introduced -Wunreachable-code-generic-assoc and enabled it by default. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268497-227>