Replace build_int_2

Nathan Sidwell nathan@codesourcery.com
Sat Aug 14 15:41:00 GMT 2004


Mark Mitchell wrote:
> OK, mostly, but:
> 
> In tree.c:
> 
> !   switch (TREE_CODE (type))
> !     {

> !      !     default:
> !       break;
> !     }
> 
> That's a pointless switch statement at the moment.  Did you mean to have 
> an assert in the default case, perhaps?
I originally had an abort there, but it turns out that make_tree (expmed.c)
makes 'paradoxical' int_csts, (fortran and C++ do too, but in those cases
the tree_code is a constant, in make_tree's case it's not compile
time known.  I figured build_int_cst should allow any legal int_cst
to be made.  I'll be filling in the other parts of that switch with
the caching code -- for now I'll remove the entire switch.

> 
> *** calls.c    28 Jul 2004 23:44:43 -0000    1.359
> --- calls.c    7 Aug 2004 14:08:23 -0000
> *************** load_register_parameters (struct arg_dat

> 
> That should be NULL_TREE, not NULLTREE.  You didn't see that in your 
> testing because it's inside #ifdef BLOCK_REG_PADDING.  (Another example 
> showing why we should use "if" rather than "#ifdef"...)
good catch, thanks!

>  error_if_numeric_overflow (tree value)
>  {
>    if (TREE_CODE (value) == INTEGER_CST
> !       && !JAVA_NOT_RADIX10_FLAG (value)
>        && tree_int_cst_sgn (value) < 0)
>      {
>        if (TREE_TYPE (value) == long_type_node)
> 
> This change doesn't seem to be in the ChangeLog, and I don't see 
> JAVA_NOT_RADIX10_FLAG in java/*.h.  Are you sure you built Java when 
> testing?
rats, I thought I'd undone that change completely. The inversion of
the radix flag is sensible when int_csts become shared, I tested the
inversion, but thought I'd taken it out.  too much of a rush before
going away...

I'll retest and commit if it's still passes.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc-patches mailing list