Question on build_int_cst
Nathan Sidwell
nathan@codesourcery.com
Wed Aug 18 10:07:00 GMT 2004
Richard Kenner wrote:
> If the idea is to avoid having to do a conversion of an integer_type_node
> to another type (and hence waste node), why doesn't it call force_fit_type
> to ensure that the constant doesn't overflow the requested type?
it is supposed to be a drop in replacement for
t = build_int_2 (x, y);
TREE_TYPE (t) = z;
AFAICT most cases of use correctly condition x & y, so the overhead of
force_fit_type would be bad. Use,
t = force_fit_type (build_int_cst (z, x, y), 0, 0, 0);
if you need to condition the range.
The idea of build_int_cst is to allow sharing of the int_csts so generated.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc
mailing list