This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] Tweak fold_builtin_unordered_cmp API
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: roger at eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 09 Mar 2005 14:51:14 -0500 (EST)
- Subject: Re: [Committed] Tweak fold_builtin_unordered_cmp API
- References: <Pine.LNX.4.44.0503091013410.8932-100000@www.eyesopen.com>
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