So it's apparent that the whole 128-bit union is initialized.

Signed-off-by: LIU Hao <[email protected]>
---
 mingw-w64-crt/stdio/mingw_pformat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-crt/stdio/mingw_pformat.c 
b/mingw-w64-crt/stdio/mingw_pformat.c
index 3470c06c5..00e4b2359 100644
--- a/mingw-w64-crt/stdio/mingw_pformat.c
+++ b/mingw-w64-crt/stdio/mingw_pformat.c
@@ -1973,7 +1973,7 @@ void __pformat_emit_xfloat( __pformat_fpreg_t value, 
__pformat_t *stream )
    * representation of the argument value.
    */
   char buf[18 + 6], *p = buf;
-  __pformat_intarg_t exponent; short exp_width = 2;
+  short exp_width = 2;
    if (value.__pformat_fpreg_mantissa != 0 ||
      value.__pformat_fpreg_exponent != 0)
@@ -2225,6 +2225,7 @@ void __pformat_emit_xfloat( __pformat_fpreg_t value, 
__pformat_t *stream )
   stream->width += exp_width;
   stream->flags |= PFORMAT_SIGNED;
   /* sign extend */
+  __pformat_intarg_t exponent;
   exponent.__pformat_u128_t.t128.digits[1] = (value.__pformat_fpreg_exponent < 
0) ? -1 : 0;
   exponent.__pformat_u128_t.t128.digits[0] = value.__pformat_fpreg_exponent;
   __pformat_int( exponent, stream );
--
2.52.0

From 1141144b5d65231ee7bfa77b8c6429871f06e654 Mon Sep 17 00:00:00 2001
From: LIU Hao <[email protected]>
Date: Wed, 26 Nov 2025 13:30:42 +0800
Subject: [PATCH 8001/8002] crt/stdio: Move `__pformat_intarg_t exponent`
 closer to its use

So it's apparent that the whole 128-bit union is initialized.

Signed-off-by: LIU Hao <[email protected]>
---
 mingw-w64-crt/stdio/mingw_pformat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-crt/stdio/mingw_pformat.c 
b/mingw-w64-crt/stdio/mingw_pformat.c
index 3470c06c5..00e4b2359 100644
--- a/mingw-w64-crt/stdio/mingw_pformat.c
+++ b/mingw-w64-crt/stdio/mingw_pformat.c
@@ -1973,7 +1973,7 @@ void __pformat_emit_xfloat( __pformat_fpreg_t value, 
__pformat_t *stream )
    * representation of the argument value.
    */
   char buf[18 + 6], *p = buf;
-  __pformat_intarg_t exponent; short exp_width = 2;
+  short exp_width = 2;
 
   if (value.__pformat_fpreg_mantissa != 0 ||
      value.__pformat_fpreg_exponent != 0)
@@ -2225,6 +2225,7 @@ void __pformat_emit_xfloat( __pformat_fpreg_t value, 
__pformat_t *stream )
   stream->width += exp_width;
   stream->flags |= PFORMAT_SIGNED;
   /* sign extend */
+  __pformat_intarg_t exponent;
   exponent.__pformat_u128_t.t128.digits[1] = (value.__pformat_fpreg_exponent < 
0) ? -1 : 0;
   exponent.__pformat_u128_t.t128.digits[0] = value.__pformat_fpreg_exponent;
   __pformat_int( exponent, stream );
-- 
2.52.0

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to