-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:headersHeaders provided by Clang, e.g. for intrinsicsHeaders provided by Clang, e.g. for intrinsicsfloating-pointFloating-point mathFloating-point math
Description
Bugzilla Link | 52532 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @DougGregor,@zygoloid,@xtkoba |
Extended Description
Notes:
- This may not be a bug. Just want to draw attention to it.
- 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
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:headersHeaders provided by Clang, e.g. for intrinsicsHeaders provided by Clang, e.g. for intrinsicsfloating-pointFloating-point mathFloating-point math