https://bugs.llvm.org/show_bug.cgi?id=52532
Bug ID: 52532
Summary: FLT16_MAX is defined but _Float16 is not supported:
confused
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Notes:
1. This may not be a bug. Just want to draw attention to it.
2. This may not be a bug in clang itself, but rather in the system / C standard
library headers. Feel free to move it.
This code:
#define __STDC_WANT_IEC_60559_TYPES_EXT__
#include <float.h>
#ifdef FLT16_MAX
_Float16 f16;
#endif
compiled with [1]:
clang -std=c11 -Wall -Wextra
leads to:
t0.c:4:1: error: _Float16 is not supported on this target
which is confusing because FLT16_MAX is defined.
Per IEC 60559 interchange and extended types [2] it seems that if FLT16_MAX is
defined, then _Float16 is supported. Otherwise, how to correctly determine at
compile time that _Float16 is supported?
Thanks for the attention.
[1] Version: clang trunk on linux on x86_64
[2] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs