https://bugs.llvm.org/show_bug.cgi?id=40559
Bug ID: 40559
Summary: Predefined __FLT16_MANT_DIG__ defined on targets that
don't support _Float16
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
The Target Info has a query for whether the target supports the _Float16 type.
However, we are not considering that query and predefining __FLT16_MANT_DIG__
unconditionally since rC313152.
This can get us in trouble for some type_traits-like compilations.
Specifically, on PPC:
$ cat predef.c
#ifdef __FLT16_MANT_DIG__
_Float16 t;
#endif
int main(void) { return 5; }
$ clang predef.c -S
predef.c:2:1: error: _Float16 is not supported on this target
_Float16 t;
^
1 error generated.
--
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