Clang tidy problem with _Float32, _Float64, _Float128

100 views Asked by At

Why does clang-tidy give me warnings about _Float32, _Float64, _Float128? The program runs fine, but the squiggles appear even in the most basic program under the first character of any file (source or header), even if the character is a blank one.

#include <iostream>

int main( )
{

    std::cout << "Hello world";

    return 0;
}

Clang tidy reports back an error like this one:

Error while processingC/C++(clang-diagnostic-error)
c++config.h(826, 36): invalid suffix 'bf16' on floating constant
cpp_type_traits.h(329, 26): use of undeclared identifier '_Float32'
cpp_type_traits.h(338, 26): use of undeclared identifier '_Float64'
cpp_type_traits.h(347, 26): use of undeclared identifier '_Float128'
cpp_type_traits.h(356, 37): no member named '__bfloat16_t' in namespace '__gnu_cxx'
stl_algobase.h(1057, 21): __float128 is not supported on this target
compare(719, 45): invalid suffix 'bf16' on floating constant
type_traits.h(201, 22): use of undeclared identifier '_Float32'
type_traits.h(207, 22): use of undeclared identifier '_Float64'
type_traits.h(213, 22): use of undeclared identifier '_Float128'
type_traits.h(219, 33): no member named '__bfloat16_t' in namespace '__gnu_cxx'
numbers(207, 20): unknown type name '_Float32'
numbers(207, 20): use of undeclared identifier '_Float32'
type_traits(470, 39): use of undeclared identifier '_Float32'
type_traits(476, 39): use of undeclared identifier '_Float64'
type_traits(482, 39): use of undeclared identifier '_Float128'
type_traits(488, 50): no member named '__bfloat16_t' in namespace '__gnu_cxx'
type_traits(494, 39): __float128 is not supported on this target

The only thing that seems to work is to set the c++ standard to something like c++11, is there a way to have the clang tidy error squiggles without giving up the features of c++23?

0

There are 0 answers