This Go frontend patch by Than McIntosh uses nullptr in a couple of cases to avoid errors in template matching with some stage1 compilers. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline.
Ian patch
f4da52d91658cf73eb95d3d8b4b0fd79c8b0ac23 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7eea97765c3..affba73e4bb 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 c6ce6230c58..0f66661937c 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);