aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/unsafe.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2011-01-14 03:27:32 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-01-14 03:27:32 +0000
commit3dac68b99e0aa1503c2743f70e67a84401002a45 (patch)
tree01bf0d7874de7304a90a873d92d8904544ec31c7 /gcc/go/gofrontend/unsafe.cc
parent632469d01e0652c465f9074d2ec7f5de1cb7dac9 (diff)
downloadgcc-3dac68b99e0aa1503c2743f70e67a84401002a45.zip
gcc-3dac68b99e0aa1503c2743f70e67a84401002a45.tar.gz
gcc-3dac68b99e0aa1503c2743f70e67a84401002a45.tar.bz2
Move clearing of flag_strict_aliasing to gcc interface.
From-SVN: r168774
Diffstat (limited to 'gcc/go/gofrontend/unsafe.cc')
-rw-r--r--gcc/go/gofrontend/unsafe.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/unsafe.cc b/gcc/go/gofrontend/unsafe.cc
index 51d812b..e219f61 100644
--- a/gcc/go/gofrontend/unsafe.cc
+++ b/gcc/go/gofrontend/unsafe.cc
@@ -6,6 +6,7 @@
#include "go-system.h"
+#include "go-c.h"
#include "types.h"
#include "gogo.h"
@@ -130,5 +131,9 @@ Gogo::import_unsafe(const std::string& local_name, bool is_local_name_exported,
if (add_to_globals)
this->add_named_object(no);
- this->imported_unsafe_ = true;
+ if (!this->imported_unsafe_)
+ {
+ go_imported_unsafe();
+ this->imported_unsafe_ = true;
+ }
}