diff --git a/libquadmath/printf/printf_fp.c b/libquadmath/printf/printf_fp.c index 8effcee88fa..9968aa5307c 100644 --- a/libquadmath/printf/printf_fp.c +++ b/libquadmath/printf/printf_fp.c @@ -363,7 +363,7 @@ __quadmath_printf_fp (struct __quadmath_printf_file *fp, /* Fetch the argument value. */ { - fpnum = **(const __float128 **) args[0]; + memcpy (&fpnum, *(const void *const *) args[0], sizeof (fpnum)); /* Check for special values: not a number or infinity. */ if (isnanq (fpnum)) diff --git a/libquadmath/printf/printf_fphex.c b/libquadmath/printf/printf_fphex.c index a40a6b00945..ddb413563c6 100644 --- a/libquadmath/printf/printf_fphex.c +++ b/libquadmath/printf/printf_fphex.c @@ -163,7 +163,8 @@ __quadmath_printf_fphex (struct __quadmath_printf_file *fp, /* Fetch the argument value. */ { - fpnum.value = **(const __float128 **) args[0]; + memcpy (&fpnum.value, *(const void *const *) args[0], + sizeof (fpnum.value)); /* Check for special values: not a number or infinity. */ if (isnanq (fpnum.value))