Tracking operator ==

Kulkarni, Mayuresh (IT) Mayuresh.Kulkarni@morganstanley.com
Tue Nov 28 00:34:00 GMT 2006


Hello,

I have a fairly large codebase, and I want to track where two doubles
are being compared using the == operator. (Am ignoring implicit
conversions for now) I am looking at static analysis tools to do this,
but if that is not feasible, then I was wondering if the following would
work:

For each .C file, run gcc (3.2) with the -fdump-tree-original option and
then search in the tree for eq_expr and work out the types of the
operands.

I don't know anything about gcc's internal tree so I would like to ask
if there are any cases (like a chain of typedefs etc) where the above
will not work. Is there any other option to gcc that might be more
suitable?

Thanks a lot for any help.
Mayuresh.
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.



More information about the Gcc-help mailing list