projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e6d8fd
)
re PR go/61746 (A line starting with /*// causes an error even if the /* is closed...
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 8 Jul 2014 20:49:38 +0000
(20:49 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 8 Jul 2014 20:49:38 +0000
(20:49 +0000)
PR go/61746
compiler: Fix C-style comment parsing.
The compiler was incorrectly seeing /*/ as a complete C-style
comment.
From-SVN: r212370
gcc/go/gofrontend/lex.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/lex.cc
b/gcc/go/gofrontend/lex.cc
index 1616963473372bfba89e29ddc24843f2d4a97f27..3404cedb5f67bf7025361cff023ba8fb647c66e7 100644
(file)
--- a/
gcc/go/gofrontend/lex.cc
+++ b/
gcc/go/gofrontend/lex.cc
@@
-598,7
+598,7
@@
Lex::next_token()
}
else if (p[1] == '*')
{
- this->lineoff_ = p - this->linebuf_;
+ this->lineoff_ = p
+ 2
- this->linebuf_;
Location location = this->location();
if (!this->skip_c_comment())
return Token::make_invalid_token(location);