[libc-commits] [libc] [libc][NFC] Fix GCC volatile warning (PR #78509)

via libc-commits libc-commits at lists.llvm.org
Wed Jan 17 14:08:14 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Guillaume Chatelet (gchatelet)

<details>
<summary>Changes</summary>

GCC complains about "type qualifiers ignored on cast result type"


---
Full diff: https://github.com/llvm/llvm-project/pull/78509.diff


1 Files Affected:

- (modified) libc/test/src/__support/FPUtil/dyadic_float_test.cpp (+1-1) 


``````````diff
diff --git a/libc/test/src/__support/FPUtil/dyadic_float_test.cpp b/libc/test/src/__support/FPUtil/dyadic_float_test.cpp
index 8fafa767ae38e34..4ab270c63628a30 100644
--- a/libc/test/src/__support/FPUtil/dyadic_float_test.cpp
+++ b/libc/test/src/__support/FPUtil/dyadic_float_test.cpp
@@ -48,7 +48,7 @@ TEST(LlvmLibcDyadicFloatTest, QuickAdd) {
 
   Float192 z = quick_add(x, y);
 
-  EXPECT_FP_EQ_ALL_ROUNDING(xd + yd, (volatile double)(z));
+  EXPECT_FP_EQ_ALL_ROUNDING(xd + yd, double(z));
 }
 
 TEST(LlvmLibcDyadicFloatTest, QuickMul) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/78509


More information about the libc-commits mailing list