Commit 0630a48f by Ian Lance Taylor

re PR go/61746 (A line starting with /*// causes an error even if the /* is…

re PR go/61746 (A line starting with /*// causes an error even if the /* is closed on the next line)

	PR go/61746
compiler: Fix C-style comment parsing.

The compiler was incorrectly seeing /*/ as a complete C-style
comment.

From-SVN: r212370
parent 7e6d8fd9
...@@ -598,7 +598,7 @@ Lex::next_token() ...@@ -598,7 +598,7 @@ Lex::next_token()
} }
else if (p[1] == '*') else if (p[1] == '*')
{ {
this->lineoff_ = p - this->linebuf_; this->lineoff_ = p + 2 - this->linebuf_;
Location location = this->location(); Location location = this->location();
if (!this->skip_c_comment()) if (!this->skip_c_comment())
return Token::make_invalid_token(location); return Token::make_invalid_token(location);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment