[PATCH] gold testsuite: avoid unused private member in undef_symbol.cc

Roland McGrath mcgrathr@google.com
Fri Oct 11 20:28:00 GMT 2013


I'm not sure why this test wasn't just "int foo(void) { return a; }"
anyway.  But this is the minimal change to the status quo that suppresses
the warning about an unused member.

OK for trunk and 2.24?


Thanks,
Roland


gold/
	* testsuite/undef_symbol.cc (Foo::get_a): New method.

--- a/gold/testsuite/undef_symbol.cc
+++ b/gold/testsuite/undef_symbol.cc
@@ -1,6 +1,6 @@
 // undef_symbol.cc -- a test case for undefined references

-// Copyright 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2007, 2008, 2013 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.

 // This file is part of gold.
@@ -31,6 +31,8 @@ class Foo
   Foo()
     : a_(a)
   { }
+  int get_a()
+  { return a_; }
  private:
   int a_;
 };



More information about the Binutils mailing list