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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to