This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: PR java/6388


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]