public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4970] ada: Fix parsing bug in GNAT.Formatted_String
@ 2023-01-03  9:34 Marc Poulhi?s
  0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-01-03  9:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7bad99da3d2a1511407136863918dabc009a7bbf

commit r13-4970-g7bad99da3d2a1511407136863918dabc009a7bbf
Author: Ronan Desplanques <desplanques@adacore.com>
Date:   Fri Dec 9 11:29:02 2022 +0100

    ada: Fix parsing bug in GNAT.Formatted_String
    
    Before this patch, GNAT.Formatted_String.Formatted_String failed to
    handle format strings with two or more specifiers whose widths were
    specified with the "*" syntax. This patch makes the parser
    correctly reset its bits of state related to width and precision
    parsing when needed.
    
    gcc/ada/
    
            * libgnat/g-forstr.adb (P_Int_Format): Fix parsing bug.

Diff:
---
 gcc/ada/libgnat/g-forstr.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/libgnat/g-forstr.adb b/gcc/ada/libgnat/g-forstr.adb
index 8353e2c4ad8..c9fb86b44f7 100644
--- a/gcc/ada/libgnat/g-forstr.adb
+++ b/gcc/ada/libgnat/g-forstr.adb
@@ -808,6 +808,7 @@ package body GNAT.Formatted_String is
          Format.D.Index := Start;
          return Format;
       end if;
+      Format.D.Stored_Value := 0;
 
       case F.Kind is
          when Unsigned_Octal =>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-03  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03  9:34 [gcc r13-4970] ada: Fix parsing bug in GNAT.Formatted_String Marc Poulhi?s

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).