-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling libc (specifically sinf.cpp) fails #57719
Comments
The full build command is |
@llvm/issue-subscribers-libc |
I should add, this was building llvm-15.0.0 |
I just checked with gcc-11.2.0 and the same error occurs |
Checked LLVM 14.0.6, there is a different error but in the same file Much longer output though[1/6922] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf.dir/sinf.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf.dir/sinf.cpp.o
/usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/build/include -I/home/liam/Downloads/llvm-project-14.0.6.src/llvm/include -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/include -I/home/liam/Downloads/llvm-project-14.0.6.src/libc -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -O3 -Wno-c++17-extensions -fpie -ffreestanding -DLLVM_LIBC_PUBLIC_PACKAGING -std=c++14 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf.dir/sinf.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf.dir/sinf.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf.dir/sinf.cpp.o -c /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sinf.cpp
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sinf.cpp:11:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: warning: use of C++17 hexadecimal floating constant
19 | static constexpr double PI63 = 0x1.921fb54442d18p-62;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: warning: use of C++17 hexadecimal floating constant
21 | static constexpr double PIO4 = 0x1.921fb54442d18p-1;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: error: exponent has no digits
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sinf.cpp:10:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint32_t __llvm_libc::as_uint32_bits(float)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:22:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
22 | return *reinterpret_cast<uint32_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint64_t __llvm_libc::as_uint64_bits(double)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:26:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
26 | return *reinterpret_cast<uint64_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘float __llvm_libc::as_float(uint32_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:30:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
30 | return *reinterpret_cast<float *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘double __llvm_libc::as_double(uint64_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:34:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
34 | return *reinterpret_cast<double *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics
[2/6922] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/math_utils.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/math_utils.cpp.o
/usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/build/include -I/home/liam/Downloads/llvm-project-14.0.6.src/llvm/include -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/include -I/home/liam/Downloads/llvm-project-14.0.6.src/libc -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wno-c++17-extensions -fpie -ffreestanding -std=c++14 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/math_utils.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/math_utils.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.math_utils.dir/math_utils.cpp.o -c /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:13:54: warning: use of C++17 hexadecimal floating constant
13 | constexpr float XFlowValues<float>::OVERFLOW_VALUE = 0x1p97f;
| ^~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:14:55: warning: use of C++17 hexadecimal floating constant
14 | constexpr float XFlowValues<float>::UNDERFLOW_VALUE = 0x1p-95f;
| ^~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:14:55: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:15:59: warning: use of C++17 hexadecimal floating constant
15 | constexpr float XFlowValues<float>::MAY_UNDERFLOW_VALUE = 0x1.4p-75f;
| ^~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:15:59: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:17:56: warning: use of C++17 hexadecimal floating constant
17 | constexpr double XFlowValues<double>::OVERFLOW_VALUE = 0x1p769;
| ^~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:18:57: warning: use of C++17 hexadecimal floating constant
18 | constexpr double XFlowValues<double>::UNDERFLOW_VALUE = 0x1p-767;
| ^~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:18:57: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:19:61: warning: use of C++17 hexadecimal floating constant
19 | constexpr double XFlowValues<double>::MAY_UNDERFLOW_VALUE = 0x1.8p-538;
| ^~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:19:61: error: exponent has no digits
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:9:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint32_t __llvm_libc::as_uint32_bits(float)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:22:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
22 | return *reinterpret_cast<uint32_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint64_t __llvm_libc::as_uint64_bits(double)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:26:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
26 | return *reinterpret_cast<uint64_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘float __llvm_libc::as_float(uint32_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:30:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
30 | return *reinterpret_cast<float *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘double __llvm_libc::as_double(uint64_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:34:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
34 | return *reinterpret_cast<double *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp: At global scope:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:14:60: error: unable to find numeric literal operator ‘operator""f’
14 | constexpr float XFlowValues<float>::UNDERFLOW_VALUE = 0x1p-95f;
| ^~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:14:60: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:15:66: error: unable to find numeric literal operator ‘operator""f’
15 | constexpr float XFlowValues<float>::MAY_UNDERFLOW_VALUE = 0x1.4p-75f;
| ^~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.cpp:15:66: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics
[3/6922] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf.dir/sincosf.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf.dir/sincosf.cpp.o
/usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/build/include -I/home/liam/Downloads/llvm-project-14.0.6.src/llvm/include -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/include -I/home/liam/Downloads/llvm-project-14.0.6.src/libc -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -O3 -Wno-c++17-extensions -fpie -ffreestanding -DLLVM_LIBC_PUBLIC_PACKAGING -std=c++14 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf.dir/sincosf.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf.dir/sincosf.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf.dir/sincosf.cpp.o -c /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf.cpp
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf.cpp:11:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: warning: use of C++17 hexadecimal floating constant
19 | static constexpr double PI63 = 0x1.921fb54442d18p-62;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: warning: use of C++17 hexadecimal floating constant
21 | static constexpr double PIO4 = 0x1.921fb54442d18p-1;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: error: exponent has no digits
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf.cpp:10:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint32_t __llvm_libc::as_uint32_bits(float)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:22:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
22 | return *reinterpret_cast<uint32_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint64_t __llvm_libc::as_uint64_bits(double)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:26:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
26 | return *reinterpret_cast<uint64_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘float __llvm_libc::as_float(uint32_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:30:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
30 | return *reinterpret_cast<float *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘double __llvm_libc::as_double(uint64_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:34:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
34 | return *reinterpret_cast<double *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics
[4/6922] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf_utils.dir/sincosf_data.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf_utils.dir/sincosf_data.cpp.o
/usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/build/include -I/home/liam/Downloads/llvm-project-14.0.6.src/llvm/include -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/include -I/home/liam/Downloads/llvm-project-14.0.6.src/libc -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wno-c++17-extensions -fpie -ffreestanding -std=c++14 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf_utils.dir/sincosf_data.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf_utils.dir/sincosf_data.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.sincosf_utils.dir/sincosf_data.cpp.o -c /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:10:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: warning: use of C++17 hexadecimal floating constant
19 | static constexpr double PI63 = 0x1.921fb54442d18p-62;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: warning: use of C++17 hexadecimal floating constant
21 | static constexpr double PIO4 = 0x1.921fb54442d18p-1;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:20:6: warning: use of C++17 hexadecimal floating constant
20 | 0x1.45f306dc9c883p+23,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:20:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:21:6: warning: use of C++17 hexadecimal floating constant
21 | 0x1.921fb54442d18p+0,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:21:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:22:6: warning: use of C++17 hexadecimal floating constant
22 | 0x1p+0,
| ^~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:22:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:23:7: warning: use of C++17 hexadecimal floating constant
23 | -0x1.ffffffd0c621cp-2,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:23:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:24:6: warning: use of C++17 hexadecimal floating constant
24 | 0x1.55553e1068f19p-5,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:24:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:25:7: warning: use of C++17 hexadecimal floating constant
25 | -0x1.6c087e89a359dp-10,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:25:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:26:6: warning: use of C++17 hexadecimal floating constant
26 | 0x1.99343027bf8c3p-16,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:26:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:27:7: warning: use of C++17 hexadecimal floating constant
27 | -0x1.555545995a603p-3,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:27:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:28:6: warning: use of C++17 hexadecimal floating constant
28 | 0x1.1107605230bc4p-7,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:28:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:29:7: warning: use of C++17 hexadecimal floating constant
29 | -0x1.994eb3774cf24p-13},
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:29:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:31:6: warning: use of C++17 hexadecimal floating constant
31 | 0x1.45f306dc9c883p+23,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:31:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:32:6: warning: use of C++17 hexadecimal floating constant
32 | 0x1.921fb54442d18p+0,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:32:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:33:7: warning: use of C++17 hexadecimal floating constant
33 | -0x1p+0,
| ^~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:33:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:34:6: warning: use of C++17 hexadecimal floating constant
34 | 0x1.ffffffd0c621cp-2,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:34:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:35:7: warning: use of C++17 hexadecimal floating constant
35 | -0x1.55553e1068f19p-5,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:35:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:36:6: warning: use of C++17 hexadecimal floating constant
36 | 0x1.6c087e89a359dp-10,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:36:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:37:7: warning: use of C++17 hexadecimal floating constant
37 | -0x1.99343027bf8c3p-16,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:37:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:38:7: warning: use of C++17 hexadecimal floating constant
38 | -0x1.555545995a603p-3,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:38:7: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:39:6: warning: use of C++17 hexadecimal floating constant
39 | 0x1.1107605230bc4p-7,
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:39:6: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:40:7: warning: use of C++17 hexadecimal floating constant
40 | -0x1.994eb3774cf24p-13},
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:40:7: error: exponent has no digits
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_data.cpp:9:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint32_t __llvm_libc::as_uint32_bits(float)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:22:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
22 | return *reinterpret_cast<uint32_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘uint64_t __llvm_libc::as_uint64_bits(double)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:26:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
26 | return *reinterpret_cast<uint64_t *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘float __llvm_libc::as_float(uint32_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:30:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
30 | return *reinterpret_cast<float *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h: In function ‘double __llvm_libc::as_double(uint64_t)’:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/math_utils.h:34:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
34 | return *reinterpret_cast<double *>(&x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics
[5/6922] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.cosf.dir/cosf.cpp.o
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.cosf.dir/cosf.cpp.o
/usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic -I/home/liam/Downloads/llvm-project-14.0.6.src/build/include -I/home/liam/Downloads/llvm-project-14.0.6.src/llvm/include -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc/include -I/home/liam/Downloads/llvm-project-14.0.6.src/libc -I/home/liam/Downloads/llvm-project-14.0.6.src/build/projects/libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -O3 -Wno-c++17-extensions -fpie -ffreestanding -DLLVM_LIBC_PUBLIC_PACKAGING -std=c++14 -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.cosf.dir/cosf.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.cosf.dir/cosf.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.cosf.dir/cosf.cpp.o -c /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/cosf.cpp
In file included from /home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/cosf.cpp:11:
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: warning: use of C++17 hexadecimal floating constant
19 | static constexpr double PI63 = 0x1.921fb54442d18p-62;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:19:32: error: exponent has no digits
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: warning: use of C++17 hexadecimal floating constant
21 | static constexpr double PIO4 = 0x1.921fb54442d18p-1;
| ^~~~~~~~~~~~~~~~~~
/home/liam/Downloads/llvm-project-14.0.6.src/libc/src/math/generic/sincosf_utils.h:21:32: error: exponent has no digits
|
Hi, I have read two stack exchange posts which might help in clarifying this issue. |
Thanks @liam-clink and @ominusliticus for reporting and investigating the problems. There are several issues I can see from the logs:
Please let me know if I miss anything. |
The problems with building LLVM libc using gcc have been cleaned up and we have set up a gcc build bot at: https://lab.llvm.org/buildbot/#/builders/250 @liam-clink, @ominusliticus : Would you mind checking if you still encounter these problems when building LLVM libc using gcc? Thanks, |
I am still getting this issue with llvm-15.0.7 as follows
|
@liam-clink - the code your error message is referencing has been modified some time back: https://github.com/llvm/llvm-project/blob/main/libc/src/__support/FPUtil/except_value_utils.h#L34 Can you try with the latest code? |
Yeah I can try building from the repo instead of release. Why would 15.0.7 not include this commit from back in Sept 1, 2022? |
Well now instead I'm getting stopped by a bug in __llvm_libc::bsearch() using the same command as I gave earlier in this issue, so I can't be sure that it is gone. I'll try a different cmake invocation. |
I'll close it for now because it does appear to be taken care of, although I can't finish compiling libc for other reasons. |
As you can see, I am building with gcc-12.2.0 . I am on Ubuntu 22.04 LTS on x86_64.
The text was updated successfully, but these errors were encountered: