diff options
author | Tom Tromey <tromey@redhat.com> | 2002-11-02 21:26:28 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-11-02 21:26:28 +0000 |
commit | 77a106a531a92278c5a28b8ec8c373621d302185 (patch) | |
tree | 964e6dc1d69e5682362f38b13eb1d4903e32a5cd /gcc/java/lex.h | |
parent | bbf6552920d38c1b0c1422d288f395a5323aff28 (diff) | |
download | gcc-77a106a531a92278c5a28b8ec8c373621d302185.zip gcc-77a106a531a92278c5a28b8ec8c373621d302185.tar.gz gcc-77a106a531a92278c5a28b8ec8c373621d302185.tar.bz2 |
re PR java/6388 (Integer.MIN_VALUE == 0x80000000 optimized to false on powerpc)
Fix for PR java/6388.
* 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.
From-SVN: r58755
Diffstat (limited to 'gcc/java/lex.h')
-rw-r--r-- | gcc/java/lex.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/java/lex.h b/gcc/java/lex.h index a458926..e79d7ee 100644 --- a/gcc/java/lex.h +++ b/gcc/java/lex.h @@ -1,5 +1,5 @@ /* Language lexer definitions for the GNU compiler for the Java(TM) language. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. @@ -185,7 +185,7 @@ extern void java_destroy_lexer PARAMS ((java_lexer *)); #define SET_LVAL_NODE_TYPE(NODE, TYPE) #define BUILD_ID_WFL(EXP) (EXP) #define JAVA_FLOAT_RANGE_ERROR(S) {} -#define JAVA_INTEGRAL_RANGE_ERROR(S) {} +#define JAVA_INTEGRAL_RANGE_ERROR(S) do { } while (0) #else @@ -237,12 +237,12 @@ extern void java_destroy_lexer PARAMS ((java_lexer *)); ctxp->c_line->current = i; \ } #define JAVA_INTEGRAL_RANGE_ERROR(m) \ - { \ + do { \ int i = ctxp->c_line->current; \ ctxp->c_line->current = number_beginning; \ java_lex_error (m, 0); \ ctxp->c_line->current = i; \ - } + } while (0) #endif /* Definitions for jc1 compilation only */ |