<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98709>98709</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] aarch64 gcc warnings
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
overmighty
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
SchrodingerZhu
</td>
</tr>
</table>
<pre>
- [ ] return types
```
[811/5026] Building CXX object libc/test/src/...test.__unit__.__build__.dir/fpbits_test.cpp.o
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp: In function ‘constexpr auto make(Sign, FP) [with T = __llvm_libc_19_0_0_git::fputil::internal::FPRep<__llvm_libc_19_0_0_git::fputil::FPType::IEEE754_Binary16>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp:241:1: warning: control reaches end of non-void function [-Wreturn-type]
241 | }
| ^
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp: In function ‘constexpr auto make(Sign, FP) [with T = __llvm_libc_19_0_0_git::fputil::internal::FPRep<__llvm_libc_19_0_0_git::fputil::FPType::IEEE754_Binary32>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp:241:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp: In function ‘constexpr auto make(Sign, FP) [with T = __llvm_libc_19_0_0_git::fputil::internal::FPRep<__llvm_libc_19_0_0_git::fputil::FPType::IEEE754_Binary64>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp:241:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp: In function ‘constexpr auto make(Sign, FP) [with T = __llvm_libc_19_0_0_git::fputil::internal::FPRep<__llvm_libc_19_0_0_git::fputil::FPType::IEEE754_Binary128>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp:241:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp: In function ‘constexpr auto make(Sign, FP) [with T = __llvm_libc_19_0_0_git::fputil::internal::FPRep<__llvm_libc_19_0_0_git::fputil::FPType::X86_Binary80>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp:241:1: warning: control reaches end of non-void function [-Wreturn-type]
[839/5026] Building CXX object libc/test/src/...est.__unit__.__build__.dir/big_int_test.cpp.o
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In member function ‘virtual void __llvm_libc_19_0_0_git::LlvmLibcUIntClassTest_BitCastToFromNativeFloat16::Run()’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:267:31: warning: converting to ‘float16’ {aka ‘_Float16’} from ‘double’ with greater conversion rank
267 | const float16 array[] = {0, 0.1, 1};
| ^~~
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<64, false, long unsigned int>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
35 | }
| ^
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<64, true, long unsigned int>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<128, false, __int128 unsigned>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<128, true, __int128 unsigned>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<16, false, short unsigned int>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<16, true, short unsigned int>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<64, false, short unsigned int>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp: In function ‘auto __llvm_libc_19_0_0_git::create(Value) [with T = BigInt<64, true, short unsigned int>]’:
/home/schrodinger/development/llvm-project/libc/test/src/__support/big_int_test.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
[854/5026] Building CXX object libc/test/src/..._unit__.__build__.dir/roundevenf16_test.cpp.o^C
ninja: build stopped: interrupted by user.
```
- [ ] conversion rank
```
/home/schrodinger/development/llvm-project/libc/test/src/math/smoke/FrexpTest.h:30:42: warning: converting to ‘_Float16’ from ‘double’ with greater conversion rank
30 | EXPECT_FP_EQ_ALL_ROUNDING(-0.0, func(-0.0, &exponent));
| ^~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
406 | if (TEST) \
| ^~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/LibcTest.h:492:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
492 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
| ^~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/FPMatcher.h:122:3: note: in expansion of macro ‘EXPECT_THAT’
122 | EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcher< \
| ^~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/FPMatcher.h:207:7: note: in expansion of macro ‘EXPECT_FP_EQ’
207 | EXPECT_FP_EQ((expected), (actual)); \
| ^~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/src/math/smoke/FrexpTest.h:30:5: note: in expansion of macro ‘EXPECT_FP_EQ_ALL_ROUNDING’
30 | EXPECT_FP_EQ_ALL_ROUNDING(-0.0, func(-0.0, &exponent));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/src/math/smoke/FrexpTest.h:30:42: warning: converting to ‘_Float16’ from ‘double’ with greater conversion rank
30 | EXPECT_FP_EQ_ALL_ROUNDING(-0.0, func(-0.0, &exponent));
| ^~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/LibcTest.h:406:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
406 | if (TEST) \
| ^~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/LibcTest.h:492:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
492 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
| ^~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/FPMatcher.h:122:3: note: in expansion of macro ‘EXPECT_THAT’
122 | EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcher< \
| ^~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/UnitTest/FPMatcher.h:211:7: note: in expansion of macro ‘EXPECT_FP_EQ’
211 | EXPECT_FP_EQ((expected), (actual)); \
| ^~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/src/math/smoke/FrexpTest.h:30:5: note: in expansion of macro ‘EXPECT_FP_EQ_ALL_ROUNDING’
30 | EXPECT_FP_EQ_ALL_ROUNDING(-0.0, func(-0.0, &exponent));
```
- [ ] `sprintf` buffer and restrict
```
1890/4107] Building CXX object libc/test/src...est.__unit__.__build__.dir/sprintf_test.cpp.o
/home/schrodinger/development/llvm-project/libc/test/src/stdio/sprintf_test.cpp: In member function ‘virtual void LlvmLibcSPrintfTest_PointerConv::Run()’:
/home/schrodinger/development/llvm-project/libc/test/src/stdio/sprintf_test.cpp:633:37: warning: passing argument 1 to ‘restrict’-qualified parameter aliases with argument 3 [-Wrestrict]
633 | written = LIBC_NAMESPACE::sprintf(buff, "%p", buff);
| ^~~~ ~~~~
/home/schrodinger/development/llvm-project/libc/test/src/stdio/sprintf_test.cpp: In member function ‘virtual void LlvmLibcSPrintfTest_FloatDecimalLongDoubleConv::Run()’:
/home/schrodinger/development/llvm-project/libc/test/src/stdio/sprintf_test.cpp:1690:8: warning: unused variable ‘big_buff’ [-Wunused-variable]
1690 | char big_buff[10000]; // Used for long doubles and other extremely wide
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsW1tz4ygW_jXkhYoLgXXxgx98006q0j3ejnu3a19USEIy0xJoAbmTl_ntWyA5dmxPJp1N0pMeq5IyqLgcvvNxzuEYU615KRgbA38KMJYbpmpers0dwBj48wvamrVU45tsrWTORcnUf9btRSrzu_ElBP4UAn8OFTOtEtDcNUwDNAdoAkGA-r-u3j3An0aeB3DsIxzYntOWV3ZYOPvyBcr0N5YZWPE0Azg2TBuAY61sZTAY2PogSVrBTZIMkiS1XZNkkHMFcFw0KTc6cY2yphnIbl6A47WsmR1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