diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-07-08 20:49:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-07-08 20:49:38 +0000 |
commit | 0630a48fdf38d31f5a413b5907f95ca0c3bed52b (patch) | |
tree | ce859a4e15455a3a034abdcbfc540daea36a3753 /gcc | |
parent | 7e6d8fd9f6f2d3ef1a3c4d439b669b6de574aed9 (diff) | |
download | gcc-0630a48fdf38d31f5a413b5907f95ca0c3bed52b.zip gcc-0630a48fdf38d31f5a413b5907f95ca0c3bed52b.tar.gz gcc-0630a48fdf38d31f5a413b5907f95ca0c3bed52b.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/lex.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc index 1616963..3404ced 100644 --- 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); |