]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/121314: quotes appearing in concatenated error strings
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 31 Jul 2025 22:28:53 +0000 (23:28 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 31 Jul 2025 22:28:53 +0000 (23:28 +0100)
commitaa19c1076f4949c95f4eafb8fbe5a44dfb8ae11c
tree9665ae303a1cfadf6c42027a5ab1fa0dacd0de31
parent04a1259ffea29718256beeb2aca3f473c1f259e4
PR modula2/121314: quotes appearing in concatenated error strings

This patch fixes the addition of strings so that no extraneous quotes
appear in the result string.  The fix is made to the bootstrap tool mc
and it has been rebuilt.

gcc/m2/ChangeLog:

PR modula2/121314
* mc-boot/GFormatStrings.cc (PerformFormatString): Rebuilt.
* mc-boot/GM2EXCEPTION.cc (M2EXCEPTION_M2Exception): Rebuilt.
* mc-boot/GSFIO.cc (SFIO_GetFileName): Rebuilt.
* mc-boot/GSFIO.h (SFIO_GetFileName): Rebuilt.
* mc-boot/Gdecl.cc: Rebuilt.
* mc-boot/GmcFileName.h: Rebuilt.
* mc/decl.mod (getStringChar): New procedure function.
(getStringContents): Call getStringChar.
(addQuotes): New procedure function.
(foldBinary): Call addQuotes to add delimiting quotes
to the new string.

gcc/testsuite/ChangeLog:

PR modula2/121314
* gm2/errors/fail/badindrtype.mod: New test.
* gm2/errors/fail/badindrtype2.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/mc-boot/GFormatStrings.cc
gcc/m2/mc-boot/GM2EXCEPTION.cc
gcc/m2/mc-boot/GSFIO.cc
gcc/m2/mc-boot/GSFIO.h
gcc/m2/mc-boot/Gdecl.cc
gcc/m2/mc-boot/GmcFileName.h
gcc/m2/mc/decl.mod
gcc/testsuite/gm2/errors/fail/badindrtype.mod [new file with mode: 0644]
gcc/testsuite/gm2/errors/fail/badindrtype2.mod [new file with mode: 0644]