public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Use nullptr in a couple of cases
@ 2021-10-05 22:06 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2021-10-05 22:06 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

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

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1363 bytes --]

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);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-05 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 22:06 Go patch committed: Use nullptr in a couple of cases Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).