Type v/s Size cast within with clause of sum()

Apologies for the late response Dave.

I agree that in majority of cases the bit width would be small enough to use either of those cast

Value of 2,147,483,647 is 7FFF_FFFF. In my sample code ::

Although the RHS is greater than 7FFF_FFFF, I find similar results with either cast ( where elements could be signed / unsigned )

[ Q3 ] Am I missing something ? I was expecting type int'( ) cast to fail in few cases compared to 32'()

[ 2 ] Using +define+SIGN in code, in R2 the RHS is 32-bit unsigned value whereas the individual elements are -1

As per your comment in thread

The type of the resulting self-determined expression can be used to determine the type of another expression it’s a part of.

[ Q2 ] Can I say that the resultant 32-bit signed sum in LHS is treated as unsigned due to RHS being unsigned ?

Thanks