This is the mail archive of the
mailing list for the GCC project.
Re: Minor bugfix/improvement for gengtype
"Zack Weinberg" <email@example.com> writes:
> The bug is simply that set_gc_used_type doesn't pay attention to
> "skip"; this causes all those annoying "<type> used but not defined"
> warnings during bootstrap, and more significantly, causes gengtype to
> write out mark functions for all those types. The functions are
> incorrect, since gengtype doesn't actually know how to mark those
> types; fortunately, they also go unreferenced, so the only effect is
> to waste space in the cc1 image.
> * gengtype.c (process_gc_options): Remove unnecessary forward decl.
> Add another out parameter, "skip".
> (set_gc_used_type): Adjust calls to process_gc_options. If a field is
> tagged "skip", do not mark its type used.
I seem to remember this was intentional, but I don't remember why, so
the patch is OK to commit. However, it's not a regression, so not
suitable for mainline at this time.