This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix gcjh handling of most negative int/longs
Jakub Jelinek writes:
> On Tue, May 23, 2006 at 01:34:15PM +0100, Andrew Haley wrote:
> > > That's right. jint is 32 bit, always.
> > Or rather, it's right as long as int32 is defined: if it isn't, that's
> > the real cause of the bug.
> The following patch fixes that (bootstrapped/regtested on 7 linux arches,
> i.e. both ILP32 and LP64 testing).
> __INT_MAX__ etc. are only defined by GCC 3.3+, but messing up with limits.h
> and still not being really portable would be a nightmare. The following
> will work when built with GCC 3.3+, or with older GCCs in the most typical
> host type size combinations (i.e. ILP32 and LP64).
> Non-GCC compilers are only supported in stage1 when bootstrapping and in
> that case gcc/java/ is already built by contemporary GCC.
> With modern GCC __LP64__ would be enough for the jword definition, but
> I think we are supposed to support even older GCCish host compilers.
> Ok for trunk?