[Gc] Patch for gcc 3.4.1

Boehm, Hans hans.boehm at hp.com
Tue Jul 6 15:31:59 PDT 2004


I suspect it was added by someone who packaged 6.3alpha6 for a
specific OS distribution?  It's not in the version in

http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source

And the version I found on my Linux box is GPL'ed, which would make
me a bit nervous, mostly because I'm not sure how to interpret that
for a file like this.

Hans

> -----Original Message-----
> From: Andrew Begel [mailto:abegel at eecs.berkeley.edu]
> Sent: Tuesday, July 06, 2004 1:36 PM
> To: Boehm, Hans
> Cc: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Patch for gcc 3.4.1
> 
> 
> ansidecl.h is in gc6.3alpha6/include, and when I did a make 
> install of 
> gc, it went into the same directory as gc_config_macros.h, which is 
> included by gc.h.
> 
> Andy
> 
> On Jul 6, 2004, at 1:31 PM, Boehm, Hans wrote:
> 
> > Thanks.
> >
> > Is ansidecl.h a standard header file?  I didn't get the impression
> > that it was.  If it isn't, it would be better to explicitly define
> > something like GC_ATTRIBUTE_UNUSED so that it expands into
> > something interesting only for gcc, and then to use that.
> >
> > Hans
> >
> >> -----Original Message-----
> >> From: gc-bounces at napali.hpl.hp.com
> >> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Andrew Begel
> >> Sent: Monday, July 05, 2004 11:03 PM
> >> To: Andrew Begel
> >> Cc: gc at napali.hpl.hp.com
> >> Subject: Re: [Gc] Patch for gcc 3.4.1
> >>
> >>
> >> So, gcc 3.4.1 is more permissive about where attributes can
> >> go than gcc
> >> 3.3. The slightly modified patch is as follows:
> >>
> >> --- /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 ATTRIBUTE_UNUSED GC_n)
> >>       { GC_FREE(__p); }
> >>
> >>     size_type max_size() const throw()
> >>
> >> ---------
> >>
> >>
> >> Andrew Begel wrote:
> >>> 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()
> >>>
> >>> _______________________________________________
> >>> Gc mailing list
> >>> Gc at linux.hpl.hp.com
> >>> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> >>
> >> _______________________________________________
> >> Gc mailing list
> >> Gc at linux.hpl.hp.com
> >> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> >>
> > _______________________________________________
> > Gc mailing list
> > Gc at linux.hpl.hp.com
> > http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 


More information about the Gc mailing list