aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-03-29 15:00:43 +0000
committerJason Merrill <jason@redhat.com>2010-03-29 15:00:43 +0000
commit6d139168ab3f4cec2a4afe0c9b349b52ace78e9a (patch)
tree876f46ded2898ed88f7228731ce8d1688068e6d7 /libcpp/lex.c
parent44eab94aaaf674fffe173a16eb7a33568078118d (diff)
Some raw string changes from N3077
* charset.c (cpp_interpret_string): Change inner delimiters to (). * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@157797 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/lex.c')
-rw-r--r--libcpp/lex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcpp/lex.c b/libcpp/lex.c
index ac28f92e640..74deab20608 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -703,7 +703,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
{
switch (raw_prefix[raw_prefix_len])
{
- case ' ': case '[': case ']': case '\t':
+ case ' ': case '(': case ')': case '\\': case '\t':
case '\v': case '\f': case '\n': default:
break;
/* Basic source charset except the above chars. */
@@ -719,18 +719,18 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
case 'Y': case 'Z':
case '0': case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9':
- case '_': case '{': case '}': case '#': case '(': case ')':
+ case '_': case '{': case '}': case '#': case '[': case ']':
case '<': case '>': case '%': case ':': case ';': case '.':
case '?': case '*': case '+': case '-': case '/': case '^':
case '&': case '|': case '~': case '!': case '=': case ',':
- case '\\': case '"': case '\'':
+ case '"': case '\'':
raw_prefix_len++;
continue;
}
break;
}
- if (raw_prefix[raw_prefix_len] != '[')
+ if (raw_prefix[raw_prefix_len] != '(')
{
int col = CPP_BUF_COLUMN (pfile->buffer, raw_prefix + raw_prefix_len)
+ 1;
@@ -751,7 +751,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
{
cppchar_t c = *cur++;
- if (c == ']'
+ if (c == ')'
&& strncmp ((const char *) cur, (const char *) raw_prefix,
raw_prefix_len) == 0
&& cur[raw_prefix_len] == '"')