diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-04-19 18:45:32 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-04-19 19:28:09 +0200 |
commit | dc7d1c74ffb1cc85e67984632f581d526c783770 (patch) | |
tree | 467ff1aa4402682685d170e4ab2ee7e9cbe18b2d /libphobos/libdruntime/gcc | |
parent | e19c6389966216af5925d2917a206cedc40540e8 (diff) | |
download | gcc-dc7d1c74ffb1cc85e67984632f581d526c783770.zip gcc-dc7d1c74ffb1cc85e67984632f581d526c783770.tar.gz gcc-dc7d1c74ffb1cc85e67984632f581d526c783770.tar.bz2 |
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.
Diffstat (limited to 'libphobos/libdruntime/gcc')
0 files changed, 0 insertions, 0 deletions