This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Widen field offset
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: aph at redhat dot com (Andrew Haley)
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Wed, 28 Jan 2004 20:48:58 +0000 (GMT)
- Subject: Re: Widen field offset
> A question: when I add a pointer and an integer, I need to widen the
> integer to be the same size as the pointer. Is it correct to do this
> by converting the integer to another pointer of the same type, or must
> I convert the integer to an integer type of the same size as a
> pointer?
I remember a port that had 22 bit PSImode pointers and 32 bit longs,
so I'd say your statement above is an overgeneralisation.
As long as you are only calculating field offsets, I suppose size_type_node
should work.