[Committed] Tweak fold_builtin_unordered_cmp API

Kazu Hirata kazu@cs.umass.edu
Wed Mar 9 19:51:00 GMT 2005

Hi Roger,

> 	* builtins.c (fold_builtin_unordered_cmp): Change prototype to take
> 	a fndecl and an arglist instead of a CALL_EXPR, exp.

In this case, fold_builtin_unordered_cmp is using

  tree type = TREE_TYPE (TREE_TYPE (fndecl));

so passing fndecl as an argument would allow you to mechanically
replace things, but others like fold_trunc_transparent_mathfn use
TREE_TYPE (exp).  What is the difference between these two?

Since exp is a CALL_EXPR, TREE_TYPE (exp) should be the return type of
whatever function exp is trying to call.  Now, is
TREE_TYPE (TREE_TYPE (fndecl)) the same thing?  Or is there a subtle

I'm pretty new to the GCC's type system, so please don't beat me too

Kazu Hitata

More information about the Gcc-patches mailing list