projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b025e29
)
compiler: discard carriage returns in raw string literals
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Sat, 11 Apr 2015 00:50:26 +0000
(
00:50
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Sat, 11 Apr 2015 00:50:26 +0000
(
00:50
+0000)
Fixes golang/go#10407.
From-SVN: r222001
gcc/go/gofrontend/lex.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/lex.cc
b/gcc/go/gofrontend/lex.cc
index 3404cedb5f67bf7025361cff023ba8fb647c66e7..aa7071dbe78050b7571313c50ec6a23167afcb4d 100644
(file)
--- a/
gcc/go/gofrontend/lex.cc
+++ b/
gcc/go/gofrontend/lex.cc
@@
-1440,7
+1440,10
@@
Lex::gather_raw_string()
bool issued_error;
this->lineoff_ = p - this->linebuf_;
p = this->advance_one_utf8_char(p, &c, &issued_error);
- Lex::append_char(c, true, &value, loc);
+ // "Carriage return characters ('\r') inside raw string literals
+ // are discarded from the raw string value."
+ if (c != '\r')
+ Lex::append_char(c, true, &value, loc);
}
this->lineoff_ = p - this->linebuf_;
if (!this->require_line())