From: Ian Lance Taylor Date: Tue, 8 Jul 2014 20:49:38 +0000 (+0000) Subject: re PR go/61746 (A line starting with /*// causes an error even if the /* is closed... X-Git-Tag: releases/gcc-5.1.0~6452 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0630a48fdf38d31f5a413b5907f95ca0c3bed52b;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc index 161696347337..3404cedb5f67 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);