[gold commit] PR 19751: Fix build problem with GCC 6

Cary Coutant ccoutant@gmail.com
Wed Mar 9 04:41:00 GMT 2016


GCC 6 complains about a couple of unused functions in gold. I've
committed this patch to add ATTRIBUTE_UNUSED to the declarations.

-cary


gold/
        PR 19751
        * arm.cc (Reloc_stub::Key::name): Add unused attribute.
        * dirsearch.cc (Dir_caches::~Dir_caches): Likewise.

diff --git a/gold/arm.cc b/gold/arm.cc
index ed13c87..c47b002 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -597,7 +597,7 @@ class Reloc_stub : public Stub

     // Name of key.  This is mainly for debugging.
     std::string
-    name() const;
+    name() const ATTRIBUTE_UNUSED;

    private:
     // Stub type.
diff --git a/gold/dirsearch.cc b/gold/dirsearch.cc
index 1b3fefa..6178332 100644
--- a/gold/dirsearch.cc
+++ b/gold/dirsearch.cc
@@ -102,7 +102,7 @@ class Dir_caches
     : lock_(), caches_()
   { }

-  ~Dir_caches();
+  ~Dir_caches() ATTRIBUTE_UNUSED;

   // Add a cache for a directory.
   void add(const char*);



More information about the Binutils mailing list