From: Than McIntosh Date: Tue, 5 Oct 2021 20:25:45 +0000 (-0400) Subject: compiler: workaround for C++ build template matching quirk X-Git-Tag: basepoints/gcc-13~4114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab67380fe60798946371b0493d2f40dedb6bc5a9;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7eea97765c34..affba73e4bb9 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 c6ce6230c58b..0f66661937cd 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 val(name != NULL ? name : this, NULL); + std::pair val(name != NULL ? name : this, nullptr); std::pair 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 - val(this, NULL); + val(this, nullptr); std::pair ins = Struct_type::struct_method_tables.insert(val);