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
605d0746
Commit
605d0746
authored
Jan 15, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catch export on func.
print names in message. R=ken OCL=22891 CL=22891
parent
33f3ed77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
src/cmd/gc/export.c
src/cmd/gc/export.c
+6
-4
src/cmd/gc/go.y
src/cmd/gc/go.y
+7
-2
No files found.
src/cmd/gc/export.c
View file @
605d0746
...
...
@@ -73,12 +73,14 @@ autoexport(Sym *s)
return
;
if
(
exportname
(
s
->
name
))
{
if
(
dcladj
!=
exportsym
)
warn
(
"uppercase missing export
"
);
warn
(
"uppercase missing export
: %S"
,
s
);
exportsym
(
s
);
}
else
{
if
(
dcladj
==
exportsym
)
warn
(
"export missing uppercase"
);
packagesym
(
s
);
if
(
dcladj
==
exportsym
)
{
warn
(
"export missing uppercase: %S"
,
s
);
exportsym
(
s
);
}
else
packagesym
(
s
);
}
}
...
...
src/cmd/gc/go.y
View file @
605d0746
...
...
@@ -186,6 +186,8 @@ xdcl:
}
|
xfndcl
{
if
($
1
!= N && $1->nname != N && $1->type->thistuple == 0)
autoexport
($
1
->
nname
->
sym
);
$$
=
N
;
}
|
LEXPORT
{
dcladj
=
exportsym
;
stksize
=
initstksize
;
}
common_dcl
...
...
@@ -205,8 +207,11 @@ xdcl:
}
|
LEXPORT
xfndcl
{
if
($
2
!= N && $2->nname != N)
exportsym
($
2
->
nname
->
sym
);
if
($
2
!= N && $2->nname != N) {
dcladj
=
exportsym
;
autoexport
($
2
->
nname
->
sym
);
dcladj
=
nil
;
}
$$
=
N
;
}
|
LPACKAGE
{
warn
(
"package is gone"
);
}
xfndcl
...
...
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