This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to bring java vtables closer to g++ abi conformance
Richard Henderson wrote:
> On Wed, Jan 23, 2002 at 01:11:39PM -0800, Per Bothner wrote:
>
>>I agree, that should probably be null_pointer_node, though it
>>doesn't really matter.. (It gets cast to ptr_type_node anyway.)
>>
>
> Where? I don't see that.
Well, there is code in output_constructor that figures out the
fieldsize. However, the code is convoluted, and it may depend on
setting the TREE_PURPOSE, so counting on it seems fragile.
> And it _does_ matter. The types of the data in static initializers
> must be correct, lest varasm.c get confused. So if you use
> integer_zero_node when you really meant a long, the wrong amount
> of data will be emitted for 64-bit targets.
Ok - I changed it to use null_pointer_node, which should be fine,
except for systems where the null pointer isn't all zeros - which
I'm sure will break in other ways.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/