public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Fix uninitialized variable looking up '_'
@ 2010-12-22  6:18 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2010-12-22  6:18 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This patch to the Go frontend fixes an uninitialized variable when
looking up the special name '_'.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: uninitialized --]
[-- Type: text/x-diff, Size: 555 bytes --]

diff -r 931747c66dfc go/gogo.cc
--- a/go/gogo.cc	Tue Dec 21 17:27:30 2010 -0800
+++ b/go/gogo.cc	Tue Dec 21 17:34:02 2010 -0800
@@ -415,6 +415,9 @@
 Named_object*
 Gogo::lookup(const std::string& name, Named_object** pfunction) const
 {
+  if (pfunction != NULL)
+    *pfunction = NULL;
+
   if (Gogo::is_sink_name(name))
     return Named_object::make_sink();
 
@@ -431,9 +434,6 @@
 	}
     }
 
-  if (pfunction != NULL)
-    *pfunction = NULL;
-
   if (this->package_ != NULL)
     {
       Named_object* ret = this->package_->bindings()->lookup(name);

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

only message in thread, other threads:[~2010-12-22  1:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-22  6:18 Go patch committed: Fix uninitialized variable looking up '_' 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).