[LLVMbugs] [Bug 17788] New: clang -pedantic -Werror complains about C11 Generics in math.h
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Nov 3 05:31:59 PST 2013
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: unassignedclangbugs at nondot.org
Reporter: rakuco at FreeBSD.org
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131103/c28a5e24/attachment.html>
More information about the llvm-bugs
mailing list