Description
Encountered an error when attempting to use stdlib_float16_bits_t on a compiler with native _Float16 support. The typedef for stdlib_float16_bits_t in ctor.h is placed inside the #else branch of the native Float16 detection block, meaning it is only defined when no native _Float16 support is detected. On such compilers, attempting to use it as shown in the README results in an "undeclared identifier" error. It's documentation says to prefer explicit helpers but doesn't mention that it's not supported on devices with native float16 support.
Related Issues
none.
Questions
No.
Reproduction
Running the readme usage example with appropriate headers.
Expected Results
For it to compile without errors.
Actual Results
example.c:28:23: error: expected ';' after expression
28 | stdlib_float16_bits_t y;
| ^
| ;
example.c:28:2: error: use of undeclared identifier 'stdlib_float16_bits_t'; did you mean 'stdlib_float16_to_bits'?
28 | stdlib_float16_bits_t y;
| ^~~~~~~~~~~~~~~~~~~~~
| stdlib_float16_to_bits
I ran it in the example file using make command.
Checklist
Description
Encountered an error when attempting to use
stdlib_float16_bits_ton a compiler with native_Float16support. The typedef forstdlib_float16_bits_tinctor.his placed inside the #else branch of the native Float16 detection block, meaning it is only defined when no native_Float16support is detected. On such compilers, attempting to use it as shown in the README results in an "undeclared identifier" error. It's documentation says to prefer explicit helpers but doesn't mention that it's not supported on devices with native float16 support.Related Issues
none.
Questions
No.
Reproduction
Running the readme usage example with appropriate headers.
Expected Results
For it to compile without errors.
Actual Results
I ran it in the example file using make command.
Checklist