diff options
author | Than McIntosh <thanm@google.com> | 2021-10-05 16:25:45 -0400 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-10-05 15:06:19 -0700 |
commit | ab67380fe60798946371b0493d2f40dedb6bc5a9 (patch) | |
tree | 90f6c254f457b71a46d591dd120e1e11b2b64cf6 /gcc/go | |
parent | 737f95bab557584d876f02779ab79fe3cfaacacf (diff) | |
download | gcc-ab67380fe60798946371b0493d2f40dedb6bc5a9.zip gcc-ab67380fe60798946371b0493d2f40dedb6bc5a9.tar.gz gcc-ab67380fe60798946371b0493d2f40dedb6bc5a9.tar.bz2 |
compiler: workaround for C++ build template matching quirk
Tweak a couple of places in the types code to use nullptr instead of
NULL to work around a template matching quirk when using certain build
compilers.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/354151
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/types.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7eea977..affba73 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -bbc1effb1a8a757a38011074f1d4477fae3936f5 +925ace70ac7426c3f8b5c0bfb75aa9601f071de4 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/types.cc b/gcc/go/gofrontend/types.cc index c6ce623..0f66661 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -2259,7 +2259,7 @@ Named_object* Type::build_equal_function(Gogo* gogo, Named_type* name, int64_t size, Function_type* equal_fntype) { - std::pair<Type*, Named_object*> val(name != NULL ? name : this, NULL); + std::pair<Type*, Named_object*> val(name != NULL ? name : this, nullptr); std::pair<Type_function::iterator, bool> ins = Type::type_equal_functions_table.insert(val); if (!ins.second) @@ -6413,7 +6413,7 @@ Struct_type::interface_method_table(Interface_type* interface, bool is_pointer) { std::pair<Struct_type*, Struct_type::Struct_method_table_pair*> - val(this, NULL); + val(this, nullptr); std::pair<Struct_type::Struct_method_tables::iterator, bool> ins = Struct_type::struct_method_tables.insert(val); |