[Bug d/98457] [d] writef!"%s" doesn't work with MonoTime / SysTick
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 19 20:42:06 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98457
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:19fc127321c7fe3962bd8b6c0064b224ab14aec7
commit r10-9718-g19fc127321c7fe3962bd8b6c0064b224ab14aec7
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Mon Apr 19 18:45:32 2021 +0200
d: Fix ICE in when formating a string with '%' or '`' characters (PR98457)
The percentage character was being confused for a format specifier in
pp_format(), whilst the backtick character was confused for the
beginning of a quoted string in expand_d_format().
Both are now properly escaped to avoid the ICE.
gcc/d/ChangeLog:
PR d/98457
* d-diagnostic.cc (expand_d_format): Handle escaped backticks.
(escape_d_format): New funtion.
(verror): Call escape_d_format on prefixing strings.
(vdeprecation): Likewise.
gcc/testsuite/ChangeLog:
PR d/98457
* gdc.dg/pr98457.d: New test.
(cherry picked from commit dc7d1c74ffb1cc85e67984632f581d526c783770)
More information about the Gcc-bugs
mailing list