[llvm-bugs] [Bug 40559] New: Predefined __FLT16_MANT_DIG__ defined on targets that don't support _Float16
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 1 03:17:20 PST 2019
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: unassignedclangbugs at nondot.org
Reporter: nemanja.i.ibm at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190201/19d33fcb/attachment.html>
More information about the llvm-bugs
mailing list