freebsd-dev/lib/msun
Dimitry Andric e50027e38d Remove unnecessary const and volatile qualifiers from __fp_type_select()
Since https://github.com/llvm/llvm-project/commit/ca75ac5f04f2, clang 15
has a new warning about _Generic selection expressions, such as used in
math.h:

    lib/libc/gdtoa/_ldtoa.c:82:10: error: due to lvalue conversion of the controlling expression, association of type 'volatile float' will never be selected because it is qualified [-Werror,-Wunreachable-code-generic-assoc]
            switch (fpclassify(u.e)) {
                    ^
    lib/msun/src/math.h:109:2: note: expanded from macro 'fpclassify'
            __fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyl)
            ^
    lib/msun/src/math.h:85:14: note: expanded from macro '__fp_type_select'
        volatile float: f(x),                                               \
                 ^

This is because the controlling expression always undergoes lvalue
conversion first, dropping any cv-qualifiers. The 'const', 'volatile',
and 'volatile const' associations will therefore never be used.

MFC after:	1 week
Reviewed by:	theraven
Differential Revision: https://reviews.freebsd.org/D35815
2022-07-15 20:09:27 +02:00
..
aarch64 Use a builtin where possible in msun 2021-11-19 11:40:46 +00:00
amd64 libm: Add missing END() directives for amd64 routines 2019-10-23 16:05:52 +00:00
arm lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
bsdsrc * lib/msun/Makefile: 2021-12-15 18:36:19 +00:00
i387 Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
ld80 * lib/msun/Makefile b/lib/msun/Makefile: 2021-12-15 18:36:20 +00:00
ld128 * lib/msun/Makefile b/lib/msun/Makefile: 2021-12-15 18:36:20 +00:00
man libc: Add HISTORY sections to the manual pages 2022-05-05 18:46:32 +02:00
powerpc libm: Add feenableexcept and fedisableexcept to library on powerpc 2022-05-13 20:24:22 -05:00
riscv RISC-V: Fix feenableexcept return value 2021-03-25 11:16:20 +00:00
src Remove unnecessary const and volatile qualifiers from __fp_type_select() 2022-07-15 20:09:27 +02:00
tests Fix failures in libm's lround_test after clang 12 import 2021-06-22 18:38:45 +02:00
x86 Resolve conflicts between macros in fenv.h and ieeefp.h 2018-05-31 20:22:47 +00:00
Makefile * lib/msun/Makefile b/lib/msun/Makefile: 2021-12-15 18:36:20 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Symbol.map Implementations of cexpl() 2021-11-05 13:51:42 +02:00