diff options
author | Tom Tromey <tromey@cygnus.com> | 2001-11-08 15:38:10 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-11-08 15:38:10 +0000 |
commit | 1fa73144cba39152fd2142bebcfd0b1faa6fbeaf (patch) | |
tree | 8d9569c5e98df492ddd441e2d8ef2f828d2237e2 /gcc/java/parse.h | |
parent | 5a21a051b749b5b61090d9c08a719057c3fa959f (diff) | |
download | gcc-1fa73144cba39152fd2142bebcfd0b1faa6fbeaf.zip gcc-1fa73144cba39152fd2142bebcfd0b1faa6fbeaf.tar.gz gcc-1fa73144cba39152fd2142bebcfd0b1faa6fbeaf.tar.bz2 |
parse.y (trap_overflow_corner_case): New rule.
* parse.y (trap_overflow_corner_case): New rule.
(unary_expression): Use it.
* lex.c (java_init_lex): Don't set minus_seen.
(yylex): Don't use minus_seen. Communicate overflow to parser for
it to handle.
(error_if_numeric_overflow): New function.
* parse.h (minus_seen): Removed field.
(JAVA_RADIX10_FLAG): New define.
From-SVN: r46846
Diffstat (limited to 'gcc/java/parse.h')
-rw-r--r-- | gcc/java/parse.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h index 22056715..b9f4b0f 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -752,8 +752,6 @@ struct parser_ctxt { /* Indicates that a context already contains saved data and that the next save operation will require a new context to be created. */ unsigned saved_data:1; - /* Integral literal overflow */ - unsigned minus_seen:1; /* Report error when true */ unsigned java_error_flag:1; /* @deprecated tag seen */ @@ -914,6 +912,11 @@ struct parser_ctxt { if (CPC_INSTANCE_INITIALIZER_LIST(C)) \ TREE_PURPOSE (CPC_INSTANCE_INITIALIZER_LIST (C)) = (S); +/* This is used by the lexer to communicate with the parser. It is + set on an integer constant if the radix is 10, so that the parser + can correctly diagnose a numeric overflow. */ +#define JAVA_RADIX10_FLAG(NODE) TREE_LANG_FLAG_0(NODE) + #ifndef JC1_LITE void java_complete_class PARAMS ((void)); void java_check_circular_reference PARAMS ((void)); |