Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
779dfea4
Commit
779dfea4
authored
Sep 30, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: correct buffer size in sprint, add -L to show full paths
R=ken2 CC=golang-dev
https://golang.org/cl/2338041
parent
bee2d5b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
src/cmd/gc/doc.go
src/cmd/gc/doc.go
+2
-0
src/cmd/gc/lex.c
src/cmd/gc/lex.c
+3
-1
src/cmd/gc/subr.c
src/cmd/gc/subr.c
+2
-0
No files found.
src/cmd/gc/doc.go
View file @
779dfea4
...
...
@@ -32,6 +32,8 @@ Flags:
output file, default 6.out for 6g, etc.
-e
normally the compiler quits after 10 errors; -e prints all errors
-L
show entire file path when printing line numbers in errors
-I dir1 -I dir2
add dir1 and dir2 to the list of paths to check for imported packages
-N
...
...
src/cmd/gc/lex.c
View file @
779dfea4
...
...
@@ -436,7 +436,9 @@ importfile(Val *f, int line)
path
=
f
->
u
.
sval
;
if
(
islocalname
(
path
))
{
cleanbuf
=
mal
(
strlen
(
pathname
)
+
strlen
(
path
->
s
)
+
2
);
sprint
(
cleanbuf
,
"%s/%s"
,
pathname
,
path
->
s
);
strcpy
(
cleanbuf
,
pathname
);
strcat
(
cleanbuf
,
"/"
);
strcat
(
cleanbuf
,
path
->
s
);
cleanname
(
cleanbuf
);
path
=
strlit
(
cleanbuf
);
}
...
...
src/cmd/gc/subr.c
View file @
779dfea4
...
...
@@ -934,6 +934,8 @@ Lconv(Fmt *fp)
break
;
fmtprint
(
fp
,
" "
);
}
if
(
debug
[
'L'
])
fmtprint
(
fp
,
"%s/"
,
pathname
);
if
(
a
[
i
].
line
)
fmtprint
(
fp
,
"%s:%ld[%s:%ld]"
,
a
[
i
].
line
->
name
,
lno
-
a
[
i
].
ldel
+
1
,
...
...
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