Go to file
Martin Oliveira 4309f9f234 include/math.h: fix warning with -Wconversion
The way the __fp_type_select macro uses the _Generic expression causes
gcc to throw a warning on valid code if the -Wconversion flag is used.

For example, consider the following program:

    #include <math.h>
    int main()
    {
    	double x = 1.0;
    	isnan(x);
    	return 0;
    }

which throws a warning:

    $ gcc -Wconversion a.c
    a.c:5:15: warning: conversion from 'double' to 'float' may change value [-Wfloat-conversion]
        5 |         isnan(x);
          |               ^

This happens because the functions are invoked inside of the _Generic.
Looking at the example of _Generic in the C11 specification, one sees
that the parameters are outside of the _Generic expression (see page 79
here: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf).

Reference: https://stackoverflow.com/a/68309379
Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/841
2024-02-02 21:05:49 -07:00
.cirrus-ci Cirrus-CI: add some timing info on pkg install failure 2021-08-04 15:02:00 -04:00
.github github: Enable github workflow output from checkstyle9.pl 2024-02-01 22:53:58 -07:00
bin ls: versort incompatible w/ timesort and sizesort 2024-02-02 13:19:10 -07:00
cddl dtrace tests: Diff expected and actual output upon a miscompare 2024-01-10 18:19:36 -05:00
contrib traceroute: Remove $FreeBSD$ rcsid tags 2024-02-02 20:14:09 -07:00
crypto OpenSSL: Update version strings 2024-02-02 16:34:36 -08:00
etc Minor change to update these files so new freebsd*.cf files are 2024-02-01 00:27:37 +00:00
gnu misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
include stdlib.h: Partially revert c27a899718 2024-02-02 12:11:50 -07:00
kerberos5 kerberos5: Mitigate the possibility of using an old libcrypto 2024-01-18 07:12:14 -08:00
lib include/math.h: fix warning with -Wconversion 2024-02-02 21:05:49 -07:00
libexec rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls 2024-02-02 09:39:54 -05:00
release release: Add the Ed25519 vagrant insecure key 2024-02-02 21:05:49 -07:00
rescue misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
sbin umount: Add -d option to detach md devices 2024-02-02 18:35:00 -07:00
secure OpenSSL: Update version strings 2024-02-02 16:34:36 -08:00
share urndis(4): retrospective, address for hselasky 2024-02-02 21:05:26 -07:00
stand loader: Move build_font_module to gfx_fb.c 2024-02-02 14:01:04 -07:00
sys sys/arm64/rockchip/rk_gpio.c: remove an extra semicolon 2024-02-02 18:35:01 -07:00
targets Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 2023-12-08 18:34:50 +01:00
tests pf: ensure dummynet gets the correct direction after route-to 2024-02-02 17:55:16 +01:00
tools checkstyle9.pl: Differentiate errors and warnings 2024-02-02 00:24:32 -07:00
usr.bin wc: Do not use st_size if it equals zero 2024-02-02 18:34:59 -07:00
usr.sbin traceroute: Lint manuals 2024-02-02 20:14:09 -07:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint
.cirrus.yml Cirrus-CI: stop forcibly installing pkg 2023-12-12 19:50:19 -05:00
.clang-format Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
.git-blame-ignore-revs git-blame-ignore-revs: OptionalObsoleteFiles.inc sorting commits 2023-11-15 17:47:02 +00:00
.gitattributes Remove SVN related Git attributes 2023-12-26 10:28:28 -07:00
.gitignore .gitignore: add sys/*/compile 2024-02-02 09:20:36 -07:00
.mailmap mailmap: Translate olce's personal address to olce@FreeBSD.org 2024-01-04 15:59:01 +01:00
CONTRIBUTING.md CONTRIBUTING.md: fix typo from commmit to commit 2023-12-28 10:01:03 -05:00
COPYRIGHT copyright: Bump the copyright date. 2023-12-31 23:15:43 -07:00
LOCKS Update LOCKS for Git 2023-12-26 10:28:25 -07:00
MAINTAINERS MAINTAINERS: change linuxkpi review Phabricator group. 2024-01-16 19:23:39 +00:00
Makefile pkgbase: Create two new rules for creating repo 2024-01-29 19:24:03 +01:00
Makefile.inc1 Revert "pkgbase: Create a FreeBSD-dtb package" 2024-02-02 11:39:51 +01:00
Makefile.libcompat build{libcompat}: Pass UNIVERSE_TOOLCHAIN_PATH to the _lc_build-tools submake 2023-08-21 21:00:45 -07:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc callout: retire callout_async_drain() 2024-01-24 09:33:27 -08:00
README.md README.md: link to the list of supported platforms 2022-11-01 12:20:55 -03:00
RELNOTES RELNOTES: document powerd enable on RPI images 2024-01-30 14:16:51 -06:00
UPDATING stand/lua: always allow overriding with local config files 2024-02-02 12:04:57 -07:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.