Skip to content

[libc] Fix missing UInt initialization #74869

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

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

gchatelet
Copy link
Contributor

Fix forward for #74862

@llvmbot llvmbot added the libc label Dec 8, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 8, 2023

@llvm/pr-subscribers-libc

Author: Guillaume Chatelet (gchatelet)

Changes

Fix forward for #74862


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

1 Files Affected:

  • (modified) libc/src/__support/float_to_string.h (+1-1)
diff --git a/libc/src/__support/float_to_string.h b/libc/src/__support/float_to_string.h
index 9f24352281fb7..92dd2e8f7e903 100644
--- a/libc/src/__support/float_to_string.h
+++ b/libc/src/__support/float_to_string.h
@@ -653,7 +653,7 @@ FloatToString<long double>::get_positive_block(int block_index) {
 
     // shift_amount = -(c0 - exponent) = c_0 + 16 * ceil(exponent/16) - exponent
 
-    cpp::UInt<MID_INT_SIZE> val;
+    cpp::UInt<MID_INT_SIZE> val(0);
 #ifdef LIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE
     // ------------------------------ TABLE MODE -------------------------------
     const int32_t SHIFT_CONST = TABLE_SHIFT_CONST;

@gchatelet gchatelet merged commit a539a09 into llvm:main Dec 8, 2023
@gchatelet gchatelet deleted the fix_gcc_buildbot branch December 8, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants