This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Error on duplicate import
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 03 May 2012 22:24:19 -0700
- Subject: Go patch committed: Error on duplicate import
This patch to the Go frontend gives an error if a file attempts to
import the same package twice under the same name. Bootstrapped and ran
Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7
branch.
Ian
diff -r c6d54ab88baf go/gogo.cc
--- a/go/gogo.cc Thu May 03 10:39:39 2012 -0700
+++ b/go/gogo.cc Thu May 03 22:20:07 2012 -0700
@@ -4946,11 +4946,6 @@
break;
case Named_object::NAMED_OBJECT_PACKAGE:
- if (new_object->is_package()
- && (old_object->package_value()->name()
- == new_object->package_value()->name()))
- return old_object;
-
break;
}