http://llvm.org/bugs/show_bug.cgi?id=17788
Bug ID: 17788
Summary: clang -pedantic -Werror complains about C11 Generics
in math.h
Product: clang
Version: 3.3
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
>From <http://article.gmane.org/gmane.os.freebsd.current.scm/5259>: David says
clang should not emit any warnings about Generics being used because math.h is
a system header, and the following snippet should build just fine with `clang
-pedantic -Werror isnan.c`:
#include <math.h>
int main() { return isnan(42.); }
At the moment, the build fails on FreeBSD 11-CURRENT with:
isnan.c:2:21: warning: generic selections are a C11-specific feature
[-Wc11-extensions]
int main() { return isnan(42.); }
^
/usr/include/math.h:118:2: note: expanded from macro 'isnan'
__fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl)
^
/usr/include/math.h:86:39: note: expanded from macro '__fp_type_select'
#define __fp_type_select(x, f, d, ld) _Generic((x), \
^
1 warning generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs