[Bug 254714] include <math.h> contains a c11 extension

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Apr 2 09:21:45 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254714

            Bug ID: 254714
           Summary: include <math.h> contains a c11 extension
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs at FreeBSD.org
          Reporter: yuri at freebsd.org

This code:
> #include <math.h>
> 
> int main() { return !isfinite(1.0); }

triggers this warning:
> $ cc -Wall -Wextra -pedantic -std=gnu99 -c  x.c 
> x.c:4:22: warning: '_Generic' is a C11 extension [-Wc11-extensions]
> int main() { return !isfinite(1.0); }
>                      ^
> /usr/include/math.h:111:21: note: expanded from macro 'isfinite'
> #define isfinite(x) __fp_type_select(x, __isfinitef, __isfinite, __isfinitel)
>                     ^
> /usr/include/math.h:82:39: note: expanded from macro '__fp_type_select'
> #define __fp_type_select(x, f, d, ld) _Generic((x),                     \
>                                       ^
> 1 warning generated.

The igraph project used -Werror and this problem caused build failure.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list