diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-29 20:07:29 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-29 20:07:29 +0000 |
commit | 3a45011c029cab0a05636e3609c19547356b3af4 (patch) | |
tree | 84b8a4bdf2073b4abe400607bab3f439398a212c /libcpp/charset.c | |
parent | d5fed3b568831182435adc37db7f20813ec2034d (diff) | |
download | gcc-3a45011c029cab0a05636e3609c19547356b3af4.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157804 138bc75d-0d04-0410-961f-82ee72b054a4
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 282430fe9ed..304efc8de0d 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; } |