Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
132e5435
Commit
132e5435
authored
Nov 04, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: line comments may end in EOF
R=ken2 CC=golang-dev
https://golang.org/cl/2907041
parent
68b4255a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
lex.c
src/cmd/gc/lex.c
+1
-5
eof1.go
test/eof1.go
+10
-0
No files found.
src/cmd/gc/lex.c
View file @
132e5435
...
...
@@ -728,14 +728,10 @@ l0:
if
(
c1
==
'/'
)
{
c
=
getlinepragma
();
for
(;;)
{
if
(
c
==
'\n'
)
{
if
(
c
==
'\n'
||
c
==
EOF
)
{
ungetc
(
c
);
goto
l0
;
}
if
(
c
==
EOF
)
{
yyerror
(
"eof in comment"
);
errorexit
();
}
c
=
getr
();
}
}
...
...
test/eof1.go
0 → 100644
View file @
132e5435
// $G $D/$F.go
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
main
// No newline at the end of this comment.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment