This is the mail archive of the gcc-patches@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: [patch libiberty include gcc]: PR debug/28047 DWARF output_file_names should really understan d DOS pathnames


Can I ask for some clarifications on this patch (applied on 2011-02-28) ?

This patch changed the equality function in a hashtable that holds file names, making for example
"/" and "\" identical entries on MS-DOS, but it didn't change the hash function, meaning
"/" and "\" are now identical hashtable entries on MS-DOS, but with a *different* hash.

How can that work ?

Lookups for "/" will look in the slot for that hash, which is not the slot for "\", because "\"
has a different hash.  So, unless there is collision, "/" will never even be compared to "\",
and the patch (which changed the comparison function, but not the hash function) would have almost
always no effect as it is.

What am I missing ?

I don't have an MS-DOS machine to test on; I was just reading the code and wondering, so I may well
be missing something important. ;-)

How was the patch tested ?  Is there a testcase ?

Thanks


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