On INTEGER_CST
Ian Lance Taylor
iant@google.com
Tue Mar 13 14:59:00 GMT 2007
"Paulo J. Matos" <pocm@soton.ac.uk> writes:
> INTEGER_CST seems to have TREE_INT_CST_LOW and TREE_INT_CST_HIGH
> fields (tree.def). Each has 32 bits.
No, each has type HOST_WIDE_INT. On a 64-bit host they will be 64
bits.
> 1 - Should I use ints for these fields?
I don't understand the question.
> 2 - If the INTEGER_CST is negative, is the negative part only in one
> of the high or low fields, i.e. low is always unsigned and high is
> always signed? If not, how do I know if the constant is signed or
> unsigned?
Negative numbers are sign extended through both the high and low
fields. That said, you need to look at the type of the constant to
know whether you have a negative number or a very large positive
number.
Ian
More information about the Gcc
mailing list