diff mbox

Go patch committed: Initialize Lex::lineoff_

Message ID mcrei99e1zf.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Dec. 23, 2010, 1:01 a.m. UTC
This patch to the Go frontend fixes a programming error: the lineoff_
field in the Lex class was not being initialized.  Bootstrapped and ran
Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian
diff mbox

Patch

diff -r 91d9863fef87 go/lex.cc
--- a/go/lex.cc	Wed Dec 22 16:54:06 2010 -0800
+++ b/go/lex.cc	Wed Dec 22 16:57:38 2010 -0800
@@ -434,8 +434,8 @@ 
 
 Lex::Lex(const char* input_file_name, FILE* input_file)
   : input_file_name_(input_file_name), input_file_(input_file),
-    linebuf_(NULL), linebufsize_(120), linesize_(0), lineno_(0),
-    add_semi_at_eol_(false)
+    linebuf_(NULL), linebufsize_(120), linesize_(0), lineoff_(0),
+    lineno_(0), add_semi_at_eol_(false)
 {
   this->linebuf_ = new char[this->linebufsize_];
   linemap_add(line_table, LC_ENTER, 0, input_file_name, 1);