diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-25 15:10:03 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-25 15:10:03 +0000 |
commit | e3b18df45bd8fe4d4fa154d8f52e05ebb4a81da8 (patch) | |
tree | 8ffa32ea82433e0486acaf7cc115ca42405e64be | |
parent | e77a1236a74de93773633cd39748bb8f79f0ea82 (diff) | |
download | gcc-e3b18df45bd8fe4d4fa154d8f52e05ebb4a81da8.zip gcc-e3b18df45bd8fe4d4fa154d8f52e05ebb4a81da8.tar.gz gcc-e3b18df45bd8fe4d4fa154d8f52e05ebb4a81da8.tar.bz2 |
compiler: don't write sink constants to C header file
Reviewed-on: https://go-review.googlesource.com/89815
From-SVN: r257049
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 0430961..e55b2bc 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -0bbc03f81c862fb35be3edee9824698a7892a17e +016ea21c4cba324c6ea6424da7988c6f985e671b The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 83be617..f89099e 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -4633,7 +4633,9 @@ Gogo::write_c_header() if (no->is_type() && no->type_value()->struct_type() != NULL) types.push_back(no); - if (no->is_const() && no->const_value()->type()->integer_type() != NULL) + if (no->is_const() + && no->const_value()->type()->integer_type() != NULL + && !no->const_value()->is_sink()) { Numeric_constant nc; unsigned long val; |