diff options
author | Jason Merrill <jason@redhat.com> | 2010-03-29 16:07:29 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-03-29 16:07:29 -0400 |
commit | 00a81b8b9daf54a09bf535734944d740bfa4ed4b (patch) | |
tree | 84b8a4bdf2073b4abe400607bab3f439398a212c /libcpp/charset.c | |
parent | 0591d33ecce39bc9d1b5871f98863de70f28c898 (diff) | |
download | gcc-00a81b8b9daf54a09bf535734944d740bfa4ed4b.zip gcc-00a81b8b9daf54a09bf535734944d740bfa4ed4b.tar.gz gcc-00a81b8b9daf54a09bf535734944d740bfa4ed4b.tar.bz2 |
More N3077 raw string changes
More N3077 raw string changes
* charset.c (cpp_interpret_string): Don't transform UCNs in raw
strings.
* lex.c (bufring_append): Split out from...
(lex_raw_string): ...here. Undo trigraph and line splicing
transformations. Do process line notes in multi-line literals.
(_cpp_process_line_notes): Ignore notes that were already handled.
From-SVN: r157804
Diffstat (limited to 'libcpp/charset.c')
-rw-r--r-- | libcpp/charset.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/libcpp/charset.c b/libcpp/charset.c index 282430f..304efc8 100644 --- a/libcpp/charset.c +++ b/libcpp/charset.c @@ -1403,23 +1403,10 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count, if (limit >= p + (p - prefix) + 1) limit -= (p - prefix) + 1; - for (;;) - { - base = p; - while (p < limit && (*p != '\\' || (p[1] != 'u' && p[1] != 'U'))) - p++; - if (p > base) - { - /* We have a run of normal characters; these can be fed - directly to convert_cset. */ - if (!APPLY_CONVERSION (cvt, base, p - base, &tbuf)) - goto fail; - } - if (p == limit) - break; - - p = convert_ucn (pfile, p + 1, limit, &tbuf, cvt); - } + /* Raw strings are all normal characters; these can be fed + directly to convert_cset. */ + if (!APPLY_CONVERSION (cvt, p, limit - p, &tbuf)) + goto fail; continue; } |