[Gc] Patch for gcc 3.4.1

Andrew Begel abegel at eecs.berkeley.edu
Mon Jul 5 17:03:00 PDT 2004


When compiling with gcc 3.4.1 and -Wall, the following patch is needed 
to quiet a warning about an unused parameter to deallocate() in 
gc_allocator.h.

Andrew


--- /home/cs/abegel/download/gc6.3alpha4/include/gc_allocator.h 
2002-05-02 20:32:38.000000000 -0700
+++ gc_allocator.h      2004-07-05 16:35:38.000000000 -0700
@@ -36,6 +36,7 @@
   */

  #include "gc.h"        // For size_t
+#include "ansidecl.h"  // For ATTRIBUTE_UNUSED

  /* First some helpers to allow us to dispatch on whether or not a type
   * is known to be pointerfree.
@@ -118,7 +119,7 @@
    }

    // __p is not permitted to be a null pointer.
-  void deallocate(pointer __p, size_type GC_n)
+  void deallocate(pointer __p, size_type GC_n ATTRIBUTE_UNUSED)
      { GC_FREE(__p); }

    size_type max_size() const throw()



More information about the Gc mailing list