From: Ronan Desplanques <desplanq...@adacore.com> Before this patch, passing a width and a precision through arguments with the "*" syntax always failed for real values in GNAT.Formatted_String's routines.
gcc/ada/ * libgnat/g-forstr.adb (P_Flt_Format): Add "*" syntax handling. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/g-forstr.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/libgnat/g-forstr.adb b/gcc/ada/libgnat/g-forstr.adb index c9fb86b44f7..2179818bba4 100644 --- a/gcc/ada/libgnat/g-forstr.adb +++ b/gcc/ada/libgnat/g-forstr.adb @@ -686,9 +686,10 @@ package body GNAT.Formatted_String is begin Next_Format (Format, F, Start); - if F.Value_Needed > 0 then + if F.Value_Needed /= Format.D.Stored_Value then Raise_Wrong_Format (Format); end if; + Format.D.Stored_Value := 0; if F.Precision = Unset then Aft := 6; -- 2.34.1