Hello All,
The gengtype utility permits mark_hook-s.
http://gcc.gnu.org/onlinedocs/gccint/GTY-Options.html
>
> mark_hook ("hook-routine-name")
> If provided for a structure or union type, the given
> hook-routine-name (between double-quotes) is the name of a
> routine called when the garbage collector has just marked the
> data as reachable. This routine should not change the data, or
> call any ggc routine. Its only argument is a pointer to the
> just marked (const) structure or union.
I am quite sure that at some point in the past, the mark_hook did work.
But I have the impression that with the current gengtype, they don't.
The MELT branch & plugin needs them (and I believe I have contributed to
add this feature to gengtype). I really hope this feature will stay in
4.6!
The MELT's gcc/melt-runtime.h file uses it
http://gcc.gnu.org/viewcvs/branches/melt-branch/gcc/melt-runtime.h?revision=162077&view=markup
But gengtype generated code don't contain any melt_mark [MELT's
gcc/melt/generated/gt-melt-runtime-plugin.h file]
http://gcc.gnu.org/viewcvs/branches/melt-branch/gcc/melt/generated/gt-melt-runtime-plugin.h?revision=162179&view=markup
Does any one have a working example of mark_hook GTY?
Cheers.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
>