79729593

Date: 2025-08-08 09:44:59
Score: 1.5
Natty:
Report link

What you can do as suggested by @usr1234567 is to compile a short code that includes _Float16.

Here's a minimal working code :

cmake_minimum_required(VERSION 3.12)

project(MyProject C)

include(CheckSourceCompiles)

check_source_compiles(C "
    #define __STDC_WANT_IEC_60559_TYPES_EXT__
    #include <float.h>
    int main() {
        _Float16 x = 1.0f16;
        return 0;
    }
" HAVE_FLOAT16)

if(HAVE_FLOAT16)
    message(STATUS "_Float16 is supported by the compiler.")
else()
    message(WARNING "_Float16 is not supported by the compiler.")
endif()

I've found __STDC_WANT_IEC_60559_TYPES_EXT__ here : https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @usr1234567
  • Starts with a question (0.5): What you can
  • Low reputation (1):
Posted by: Danielc-n