This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Replace build_int_2
- From: Jason Merrill <jason at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>, Richard Henderson <rth at redhat dot com>
- Date: Sat, 07 Aug 2004 11:49:16 -0400
- Subject: Re: Replace build_int_2
- References: <4114E641.4020805@codesourcery.com>
On Sat, 07 Aug 2004 15:25:05 +0100, Nathan Sidwell <nathan@codesourcery.com> wrote:
> I rejected the idea of
> #define build_int_2 (x, y) build_int_cst (NULL, x, y)
> as I will be changing the API of build_int_cst, in that the returned
> node might be shared, and wanted to examine every use, and flag to
> others that it is now different.
Makes sense. What do you suggest for creating a new INTEGER_CST with the
same value but different type?
build_int_cst (newtype, TREE_INT_CST_LOW (old), TREE_INT_CST_HIGH (old))
seems a bit verbose.
Jason