This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hash table iterators.


On Thu, Nov 22, 2012 at 12:18 PM, Lawrence Crowl <crowl@googlers.com> wrote:
> I have found that tree-flow.h implements iteration over htab_t,
> while there is no current facility to do that with hash_table.
> Unfortunately, the specific form does not match the standard C++
> approach to iterators.  We have several choices.
>
> (1) Ignore the problem and leave all such tables as htab_t.
>
> (2) Write new hash_table iteration functions to match the form of
> the existing GCC macro/function approach.
>
> (3) Write new hash_table iteration functions to match the form used
> by the C++ standard.  This approach would entail modifying the loops.
>
> Diego and I have a preference for (3).  What do you prefer?

We have to look for the long term shape of the source code.  From that
perspective, the choice is simple: (3).

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]