diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-08 15:38:10 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-08 15:38:10 +0000 |
commit | 6b8d70461b50eb2950a4b9c10d816d1d1700b9df (patch) | |
tree | 8d9569c5e98df492ddd441e2d8ef2f828d2237e2 /gcc/java/parse.h | |
parent | f173506ef6202d1929befc36168bcb32585db728 (diff) | |
download | gcc-6b8d70461b50eb2950a4b9c10d816d1d1700b9df.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46846 138bc75d-0d04-0410-961f-82ee72b054a4
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 220567157d0..b9f4b0f8921 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)); |