[PATCH 1/7] [D] libiberty: Correctly decode white or non-printable characters
Iain Buclaw
ibuclaw@gdcproject.org
Wed May 13 08:51:00 GMT 2015
Hi,
Started these as separate patches, but as more came out of what I was
originally trying to achieve (see Patch 6/7), I thought it better to
have it as a running series.
These set out to update d-demangle.c for new ABI additions, general
bug fixes, and improved template support.
---
D templates can have string literals encoded inside them, which can
also include tabs, newlines, and other whitespace characters. For
example:
return getHost!q{
auto he = gethostbyname(toStringz(param));
}(name);
In this case, rather than decoding and writing out every character
directly, whitespace or other non-printable characters should be
represented as escape sequences.
---
libiberty/ChangeLog:
2015-05-13 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_parse_string): Represent embedded whitespace or
non-printable characters as hex or escape sequences.
* testsuite/d-demangle-expected: Add test for templates with tabs and
newlines embedded into the signature.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-D-demangle-Correctly-decode-white-or-non-printable-c.patch
Type: text/x-diff
Size: 2354 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150513/fbc567bf/attachment.bin>
More information about the Gcc-patches
mailing list