On Thu, Aug 9, 2012 at 2:44 PM, Diego Novillo <dnovi...@google.com> wrote: > On Thu, Aug 9, 2012 at 5:03 AM, Richard Guenther > <richard.guent...@gmail.com> wrote: > >> But now with doing it in stages you end up with (this) first stage >> that complicates >> gengtype to support a very small subset of C++ types (namely the one special >> case you need for vec.h). Exactly what I did _not_ want! > > No. It supports all C++ types. All it needs is the user annotation.
You said it only works for types in the template parameter list and there you only support types (and not integers). Which means I fail to see how it works for VEC(tree). As far as I understand you are not creating the gt_pch_nx overloads for all GTYed types (which includes 'tree'). If you do then I fail to see why it should be restricted at all? >> I understood that you had the complete "killing of gengtype with fire" ready >> (or almost ready). Please finish it instead. > > No. It was not even close. The full re-write will wait until the > branch is merged in trunk. It will touch too many files and the branch > is already hard to maintain as it is. Well. So what are exactly the limitations? If I can provide user-defined gc routines for all C++ types and gengtype will pick them up automagically when auto-generating gc routines for other types then fine. What I do not understand is why you need a GTY(()) annotation on C++ types with user-defined gc routines. gengtype should treat all types not marked with GTY(()) as having user-defined gc routines, no? Richard. > Adding support for explicit user annotations is easy enough. Patch coming up. > > > Diego.