[gfortran, committed] Cleanup gfc_find_gsymbol

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Fri Mar 30 04:15:00 GMT 2007


Hi,

my previous patch reminded me that we're still using strcmp to establish 
the ordering in our binary tree of symbols instead of pointer 
comparisons.  I refrained from fixing this to use pointer comparisons, 
because I didn't want to dive into the wondrous world that is the C 
standard to find out, if --or how-- one can assume any ordering relation 
between pointers, necessary to build up a binary tree.

Anyway, looking over the code I spotted that gfc_find_gsymbol 
unnecessarily descends into both branches of the global symbol tree, so 
I fixed it to do The Right Thing.

Committed as r123355 under the obviously correct rule after the 
obligatory testing on i386-darwin.

Cheers,
- Tobi

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gsymbol.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070330/56c08511/attachment.txt>


More information about the Gcc-patches mailing list