freebsd-dev/lib/msun
Dimitry Andric 7702d940ec Avoid -pedantic warnings about using _Generic in __fp_type_select
When compiling parts of math.h with clang using a C standard before C11,
and using -pedantic, it will result in warnings similar to:

bug254714.c:5:11: warning: '_Generic' is a C11 extension [-Wc11-extensions]
  return !isfinite(1.0);
          ^
/usr/include/math.h:111:21: note: expanded from macro 'isfinite'
                    ^
/usr/include/math.h:82:39: note: expanded from macro '__fp_type_select'
                                      ^

This is because the block that enables use of _Generic is conditional
not only on C11, but also on whether the compiler advertises support for
C generic selections via __has_extension(c_generic_selections).

To work around the warning without having to pessimize the code, use the
__extension__ keyword, which is supported by both clang and gcc. While
here, remove the check for __clang__, as _Generic has been supported for
a long time by gcc too now.

Reported by:	yuri
PR:		254714
MFC after:	1 week
2021-04-08 18:20:32 +02:00
..
aarch64 Save all fpcr/fpsr bits in the AArch64 fenv_t 2021-03-12 17:01:41 +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 msun: drop clause 3 from the Berkeley license. 2019-12-27 01:11:26 +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: Fix x86 GCC6 build after 221622ec0c 2021-03-12 18:44:44 +00:00
ld128 lib/msun: Avoid FE_INEXACT for x86 log2l/log10l 2021-03-08 09:39:32 +00:00
man Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
mips lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
powerpc [POWERPC] msun: fix incorrect flag in fesetexceptflag 2020-11-17 12:36:59 +00:00
riscv RISC-V: Fix feenableexcept return value 2021-03-25 11:16:20 +00:00
src Avoid -pedantic warnings about using _Generic in __fp_type_select 2021-04-08 18:20:32 +02:00
tests lib/msun/tests: Drop WARNS=6 2021-03-22 16:57:43 +00:00
x86 Resolve conflicts between macros in fenv.h and ieeefp.h 2018-05-31 20:22:47 +00:00
Makefile Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Symbol.map msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd 2018-07-15 00:23:10 +00:00