aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lex.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-11-06 00:01:01 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-11-06 00:01:01 +0000
commitc034b4535845e25b6d4ba62be5bccb86ee7278c6 (patch)
tree2b6700e1b5e792d259ddb86880b95e93c8315f4b /gcc/java/lex.h
parent112615e7d3db8aae00b002543db3ddf94e8e31a2 (diff)
downloadgcc-c034b4535845e25b6d4ba62be5bccb86ee7278c6.zip
gcc-c034b4535845e25b6d4ba62be5bccb86ee7278c6.tar.gz
gcc-c034b4535845e25b6d4ba62be5bccb86ee7278c6.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: r58843
Diffstat (limited to 'gcc/java/lex.h')
-rw-r--r--gcc/java/lex.h8
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 */