In case anyone cares.... The gcc version shipped with NetBSD 4.0.1 ("gcc version 4.1.2 20061021 prerelease (NetBSD nb3 20061125)") has a doc/gty.texi that is rather incomplete. Specifically, it lists three things that must be marked for the garbage collector, with wording that implies the list is exhaustive:
All @code{struct} and @code{union} declarations that define data structures that are allocated under control of the garbage collector must be marked. All global variables that hold pointers to garbage-collected memory must also be marked. Finally, all global variables that need to be saved and restored by a precompiled header must be marked. However, this is incomplete. I added a field to c_parser c_lcs *lcs but did not mark anything new with GTY because c_lcs is not a garbage-collected type. (Whether or not this is a good design for my purposes is irrelevant here.) But then, upon trying to build the resulting source, gengtype fell over, complaining "unidentified type `c_lcs'". Obviously, there is something else that needs marking somehow, beyond the things listed, but it is not clear what, nor what the correct marking is. (It's possible that the problem is that GCed memory may not contain pointers to non-GCed memory, but if so that needs to be clearly specified; if it's there now, I couldn't find it. The closest I could find was a statement that "[t]he type machinery expects all pointers to point to the start of an object", which the pointer I added does.) It's possible this is NetBSD damage; their import has damaged the gcc tree in at least one known way (BUGS has disappeared), but it seems unlikely to me that they'd ship the doc file for a different version from the source. I don't see anything akin to source-code control IDs in the files, so I'm not sure how to most usefully identify the exact versions of individual files; if you believe this is NetBSD damage, let me know and I'll file a NetBSD bug report for it, and if you can think of a good way for me to identify the particular file version in question, let me know that too and I can. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B