https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119915

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Gaius Mulley
<ga...@gcc.gnu.org>:

https://gcc.gnu.org/g:07c5d7ce0daccc8110953a8e65861ffc17ed92aa

commit r15-9675-g07c5d7ce0daccc8110953a8e65861ffc17ed92aa
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Tue May 13 18:04:57 2025 +0100

    [PATCH] PR modula2/119915: Sprintf1 repeats the entire format string if it
starts with a directive

    This bugfix is for FormatStrings to ensure that in the case of %x, %u the
    procedure function PerformFormatString uses Copy rather than Slice to
    avoid the case on an upper bound of zero in Slice.  Oddly the %d case
    had the correct code.

    gcc/m2/ChangeLog:

            PR modula2/119915
            * gm2-libs/FormatStrings.mod (PerformFormatString): Handle
            the %u and %x format specifiers in a similar way to the %d
            specifier.  Avoid using Slice and use Copy instead.

    gcc/testsuite/ChangeLog:

            PR modula2/119915
            * gm2/pimlib/run/pass/format2.mod: New test.

    (cherry picked from commit 7a4f7a92770db4e739e76a06175454ba38d60b22)

    Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>
  • [Bug modula2/119915] Sprintf1 r... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to