This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: PR java/6388
- From: Richard Henderson <rth at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 3 Nov 2002 12:26:45 -0800
- Subject: Re: Patch: PR java/6388
- References: <87iszeps27.fsf@fleche.redhat.com>
On Sun, Nov 03, 2002 at 08:54:24AM -0700, Tom Tromey wrote:
> * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
> * java-tree.h (enum java_tree_index): New values
> JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
> (decimal_int_max, decimal_long_max): New defines.
> * lex.c (yylex): Rewrote range checking. Sign extend literals.
> (error_if_numeric_overflow): Rewrote range checking.
> * decl.c (java_init_decl_processing): Initialize decimal_int_max,
> decimal_long_max.
Looks ok except for
> + decimal_long_max = (HOST_BITS_PER_WIDE_INT == 32
> + ? build_int_2 (0, 0x80000000)
> + : build_int_2 (0x8000000000000000, 0));
which might error on some compiler that doesn't support 64-bit types.
(You get away with this for gcc because of long long support.)
r~