[gcc r16-9342] a68: escape %< and %> in call to sprintf

"Jose E. Marchesi via Gcc-cvs" <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:daddd419ddc6f3ee59653db1ada65f14026bb249

commit r16-9342-gdaddd419ddc6f3ee59653db1ada65f14026bb249
Author: Jose E. Marchesi <[email protected]>
Date:   Sun Jun 14 10:27:04 2026 +0200

    a68: escape %< and %> in call to sprintf
    
    Signed-off-by: Jose E. Marchesi <[email protected]>
    
    gcc/algol68/ChangeLog
    
            * a68-parser-brackets.cc (bracket_check_error): Escape %< and
            %> in call to printf.
    
    (cherry picked from commit 5956ba140692c42efe0365271004689bd84194d1)

Diff:
---
 gcc/algol68/a68-parser-brackets.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/algol68/a68-parser-brackets.cc b/gcc/algol68/a68-parser-brackets.cc
index 70efb4cad087..38aa9f3c8202 100644
--- a/gcc/algol68/a68-parser-brackets.cc
+++ b/gcc/algol68/a68-parser-brackets.cc
@@ -51,7 +51,7 @@ bracket_check_error (char *txt, int n, const char *bra, const char *ket,
   const char *strop_bra = a68_strop_keyword (bra);
 
   BUFCLR (buf);
-  if (snprintf (buf, SNPRINTF_SIZE, "missing matching %<%s%>",
+  if (snprintf (buf, SNPRINTF_SIZE, "missing matching %%<%s%%>",
 		(n > 0 ? strop_ket : strop_bra)) < 0)
     gcc_unreachable ();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.