This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rfa] libiberty: splay tree performance improvement
> > New fields must always be added at the end of the structure,=20
>
> Given the uninstalled nature of libiberty, why is this important?
Assuming an uninstalled libiberty is incorrect.
> > and you must verify that nothing outside of libiberty allocates
> > memory for this structure (dynamically or statically). =20
>
> There are no references to the type name outside libiberty in
> either gcc or gdb code bases. Can you suggest another
> nonexistence assurance test?
Hmm... I wonder if we can tag the structure such that it has an
indeterminate size when used outside of libiberty/splay-tree.c, so
that attempts to take sizeof(splay_tree_s) fail?