This is the mail archive of the
mailing list for the GCC project.
Re: bootstrap compare failure in ada/targparm.o on i686-pc-linux-gnu?
On Mon, Apr 04, 2005 at 08:06:42PM -0400, Diego Novillo wrote:
> On Mon, Apr 04, 2005 at 07:21:43PM -0300, Alexandre Oliva wrote:
> > Perhaps. But the fundamental problem is that we shouldn't be hashing
> > on pointers, and tree-eh.c does just that for finally_tree and
> > throw_stmt_table.
> I've heard both versions: that hashing on pointers is no big
> deal, and that we should never do that. The reality is that
> pointer hashing is pervasive in the compiler.
I think that the answer is "it depends".
The danger of hashing on pointers is if anything depends on the order of
traversal of the hash table, as this creates nondeterminism and Heisenbugs
(as any small disturbance or even environment variables will change the
addresses). As long as it can be assured that the order has no effect,
there shouldn't be a problem. If the hash table is just used for caching,
set membership etc., or if a separate mechanism is used to define the
order of processing hash table data, then the order created by the hash
does not matter.