[RFC PATCH] Hashtab iterators
Paolo Bonzini
bonzini@gnu.org
Mon Oct 4 10:38:00 GMT 2004
Paolo Bonzini wrote:
> The attached patch is a stab at providing an iterator interface for
> libiberty's hashtabs, to replace htab_traverse and htab_traverse_noresize.
>
> The interface is a FOR_EACH_* one similar to that employed by
> basic-block.h after the edge-vector-branch merge.
>
> There are a few hurdles because some functions must be moved to
> hashtab.h, but they are easily done. In particular htab_size and
> htab_elements are now "static inlines", but they must be kept as "extern
> inlines" while compiling hashtab.c too.
>
> I still have a problem however, and that's why this is an RFC: if I put
> ANSI declarations in include/hashtab.h, libiberty compilation complains
> because of -Wtraditional, while if I put old-style declarations, gcc
> compilation complains because of -Wstrict-prototypes. What to do? Would
> it be ok to convert libiberty or hashtabs to ISO C and remove
> -Wtraditional from there?
>
> Paolo
This time, with the patch.
Paolo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hashtab-iterator.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041004/b1939c59/attachment.ksh>
More information about the Gcc-patches
mailing list