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: [Committed] Tweak fold_builtin_unordered_cmp API


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
difference?

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

Kazu Hitata


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