projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10d91e5
)
compiler: Don't permit importing a package as "init".
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 12 Dec 2013 19:25:29 +0000
(19:25 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 12 Dec 2013 19:25:29 +0000
(19:25 +0000)
From-SVN: r205938
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index
e16b0d3
..
045763c
100644
(file)
--- a/
gcc/go/gofrontend/gogo.cc
+++ b/
gcc/go/gofrontend/gogo.cc
@@
-440,6
+440,9
@@
Gogo::import_package(const std::string& filename,
return;
}
+ if (local_name == "init")
+ error_at(location, "cannot import package as init");
+
if (filename == "unsafe")
{
this->import_unsafe(local_name, is_local_name_exported, location);